Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在设置我的数据库以接收散列密码而不接受纯文本。
我会去这样的事情吗?
create table User( username varchar(20) not null, password varchar(64) not null, );
是的,SHA256 总是 256 位长,相当于 32 字节,或十六进制字符串格式的 64 字节。您甚至可以使用 char(64) 代替 varchar(64),因为大小不会改变。
是的,它总是有 64 个字符。