On 20.Sep.2002 -- 12:10 PM, Antonio Gallardo Rivera wrote:
> I am using authentication against the database. I am storing and geting the
> user parameters from a database. My question is:
>
> How can I encrypt the password to store it then in the database?
>
> Thanks in advance :)
If you want
A bit off-topic, but:
A good method is using a SHA-Hash of the password like this:
public static String encryptPassword(String pstrPassword) {
MessageDigest sha = MessageDigest.getInstance("SHA");
sha.update(pstrPassword.getBytes());
byte abytHash[] = sha.digest();
Stri