Re: binary password in SQL??
- From: Aki Tuomi <cmouse@xxxxxxxxxxxxxxxx>
- Date: Sat, 29 Apr 2006 13:08:36 +0300
timasmith@xxxxxxxxxxx kirjoitti:
Hi,
I used this function to convert the password to a hashe value
public static byte[] getKeyedDigest(byte[] buffer, byte[] key)
throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(buffer);
return md5.digest(key);
}
But the output was completely invalid to use for SQL to save in a field
?ª4úø...¦ÁœIÃÑäjÈ
Without doing a binary save - how can I easily convert the output to
regular ascii?
thanks
Tim
There is no reason why you coulnd't save binary data in SQL database.
Unless of course you are using some DBM or database that does not
support binary data at all. There is a reason for VARBINARY and BLOB
data types. =)
Aki
.
- References:
- binary password in SQL??
- From: timasmith
- binary password in SQL??
- Prev by Date: Re: Eclipse Visual Editor Plugin Simple Question
- Next by Date: Socket connection between Java and C possible?
- Previous by thread: Re: binary password in SQL??
- Next by thread: Java In A Nutshell, 5th Edition
- Index(es):
Relevant Pages
|