【发布时间】:2011-12-08 10:26:15
【问题描述】:
一方面我有: http://forums.enterprisedb.com/posts/list/2481.page 这里我们将字段声明为 BYTEA,我们可以对其进行解密,并且加密是在 db 级别。
另一方面: https://www.owasp.org/index.php/Hashing_Java 这里作为varchar,我们只比较hash来授权。
最后 Spring 给出了 http://static.springsource.org/spring-security/site/docs/3.1.x/apidocs/org/springframework/security/crypto/password/StandardPasswordEncoder.html + char 应用的密码值对于每个密码都相同吗?
哪种方法最好? (我倾向于 Spring,因为据我了解,它在几行代码中封装了与 OWASP 相似的逻辑?)
【问题讨论】:
-
“最好”对您来说意味着什么?
-
代码更少,更安全。
标签: passwords password-encryption