NAME
Crypt::SaltedHash - Perl interface to functions that will assist in working with salted hashes.
SYNOPSIS
use Crypt::SaltedHash;
my $csh = Crypt::SaltedHash->new(algorithm => 'SHA-1');
$csh->add('secret');
my $salted = $csh->generate;
my $valid = Crypt::SaltedHash->validate($salted, 'secret');
DESCRIPTION
The Crypt::SaltedHash
module provides an object oriented interface to create salted (or seeded) hashed of clear text data. The original formalization of this concept comes from RFC-3112 and is extended by the use of different digital agorithms.
METHODS
- new([%options])
-
Returns a new Crypt::SaltedHash object. Possible keys for %options are:
- algorithm: It's also possible to use common string representations of the algorithm (e.g. "sha256", "SHA-384"). If the argument is missing, SHA-1 will be used by default.
- obj()
- add($data, ...)
-
Logically joins the arguments into a single string, and uses it to update the current digest state. For more details see Digest.
- generate()
- validate($hasheddata, $cleardata)
FUNCTIONS
none yet.
SEE ALSO
AUTHOR
Sascha Kiefer, esskar@cpan.org
ACKNOWLEDGMENTS
The author is particularly grateful to Andres Andreu for his article: Salted hashes demystified - A Primer (http://www.securitydocs.com/library/3439)
COPYRIGHT AND LICENSE
Copyright (C) 2005 Sascha Kiefer
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.