![]() |
![]()
| ![]() |
![]()
NAMEJifty::DBI::Filter::SaltHash - salts and hashes a value before storing it DESCRIPTIONThis filter will generate a random 4-byte salt, and then MD5 the given value with the salt appended to the value. It will store the hash and the salt in the database, and return a data structure that contains both on decode. The salt and hash are stored in hexadecimal in the database, so that you can put them in a text field. This filter is intended for storing passwords in a database. encodeGenerate a random 4-byte salt, MD5 the value with the salt (encoded to hexadecimal) appended to it, and store both in the database. generate_saltReturn a random 4-byte salt value, encoded as an 8-character hex string. decodeReturn an arrayref of (hash, salt), both as hex strings. To test whether a provided value is the same one originally encoded, use $hash eq md5_hex($value . $salt); SEE ALSOJifty::DBI::Filter, Digest::MD5
|