开发者

Store Password Field in Encryption Form Using MySQL and Hibernate

I am using Spring, Hibernate for developing my application. And as DB side, I have MySQL. I have an User table and that has password field of varchar type.

Now, when a new user is created, I just want store password field in an encrypted form. Is there any facility provided by Hibernate to do so? Or is there开发者_Go百科 any other way?


You might want to take a look at this thread which provides good answers for the same question:

Password encryption with Spring/Hibernate - Jasypt or something else?

In short, using a one-way hashing algorithm with salt to encrypt the password is the de-facto way of doing this.


I have resolve this issue by creating one trigger in mysql.

So, whenever any record created for User Table, it will fetch the password of that field and converted the password into encrypted form supported by mysql in-built function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜