简体   繁体   中英

What column character encoding should I use for password_hash()?

我应该使用什么列字符编码来存储在MySQL数据库中使用PHP的password_hash()生成的密码?

I question whether password hash should even be in core. It certainly addresses some problems faced by underworld implementations. It dummies down security by marrying security to php release. But at least you get something. And afterall, the PHP community has shall we say high standard deviation of talent.

The best way to go is UTF-8.

Although currently password hash returns values in latin1 charset, with utf-8 you are future proof. You cannot know how things will evolve in the future with PHP, hashing etc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM