in reply to Storing encryted passwords in MySQL
From 'man 3c crypt' in my gcc installation:
By taking the lowest 7 bits of each of the first eight characters of the key, a 56-bit key is obtained. This 56-bit key is used to encrypt repeatedly a constant string (usually a string consisting of all zeros). The returned value points to the encrypted password, a series of 13 printable ASCII characters (the first two characters rep- resent the salt itself). The return value points to static data whose content is overwritten by each call.
You are limited to 8 characters for the password no matter how many input characters are allowed. Also, the output will be exactly 13 characters long.
If you want to allow longer passwords, look at MD5 instead of crypt. Your passwords can be arbitrarily long and the resulting hash will be 32 characters for hex and 22 for base64.
HTH
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Storing encryted passwords in MySQL
by spacewarp (Pilgrim) on Jun 06, 2003 at 20:18 UTC | |
by pzbagel (Chaplain) on Jun 06, 2003 at 20:46 UTC | |
by waswas-fng (Curate) on Jun 06, 2003 at 21:12 UTC | |
by spacewarp (Pilgrim) on Jun 06, 2003 at 23:59 UTC |