| copyright: | 2007-2009-2008 by Armin Ronacher |
|---|---|
| license: | MIT |
Check a password against a given hash value. Since many forums save md5 passwords with no salt and it’s technically impossible to convert this to a hash with a salt we use this to be able to check for plain passwords:
plain$$default
md5 passwords without salt:
md5$$c21f969b5f03d33d43e04f8f136e7682
md5 passwords with salt:
md5$123456$7faa731e3365037d264ae6c2e3c7697e
sha(sha-0) passwords:
sha$123456$118083bd04c79ab51944a9ef863efcd9c048dd9a
sha1 passwords:
sha1$123456$118083bd04c79ab51944a9ef863efcd9c048dd9a
Note that the integral passwd column in the table is only 60 chars long. If you have a very large salt or the plaintext password is too long it will be truncated.