spring - 我如何加密密码将其插入数据库并在比较后何时连接?

标签 spring postgresql encryption spring-security password-encryption

我如何加密密码并将其插入数据库并在比较后他何时要连接?

我会使用 Spring security 3.1。

链接文档 Spring :http://docs.spring.io/spring-security/site/docs/3.1.4.RELEASE/reference/crypto.html链接 API SSpring 安全 3.1.4:http://docs.spring.io/spring-security/site/docs/3.1.4.RELEASE/apidocs/

最佳答案

对密码进行哈希处理并将其存储在数据库中..当登录时对输入的密码进行哈希处理并将其与存储在数据库中的密码进行比较..

检查此链接.. 可能对您有帮助...

http://www.mkyong.com/spring-security/spring-security-password-hashing-example/

关于spring - 我如何加密密码将其插入数据库并在比较后何时连接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19479405/

相关文章:

java - 使用 RedirectAttributes 作为 bean spring mvc

java - org.hibernate.TransientObjectException : how to properly define one-to-one relationship?

android - 加密 Android 设备上的信息(合理防止用户访问)

android - 如何安全地将一些数据从服务器传输到安卓设备

php - 我可以向用户提供一个加密的字符串并确保它在 1-2 小时内是安全的吗

java - 测试包含日期字段的对象

postgresql - 如何减去两个总和列的结果

node.js - 如何在sequelize模型中插入外键

postgresql - Postgres : strange behavior with optimistic locking

spring - url 编码字符被 webflow/EL/JSF 错误解析