How can I hash a password in Java?

前端 未结 13 2263
暖寄归人
暖寄归人 2020-11-22 05:00

I need to hash passwords for storage in a database. How can I do this in Java?

I was hoping to take the plain text password, add a random salt, then store the salt a

13条回答
  •  甜味超标
    2020-11-22 05:27

    Here you have two links for MD5 hashing and other hash methods:

    Javadoc API: https://docs.oracle.com/javase/1.5.0/docs/api/java/security/MessageDigest.html

    Tutorial: http://www.twmacinta.com/myjava/fast_md5.php

提交回复
热议问题