NAME
Crypt::Passphrase::Pepper::Base - A base class for pre-hashing pepper implementations
VERSION
version 0.016
DESCRIPTION
This is a base-class for pre-peppering implementations. You probably want to use Crypt::Passphrase::Pepper::Basic instead.
METHODS
new(%args)
This creates a new Crypt::Passphrase::Pepper::Base
. As it's an abstract class you shouldn't call this unless you're writing a subclass.
hash_password($password)
This hashes the passwords with the active pepper.
needs_rehash($hash)
This returns true if the hash uses a different cipher or pepper, or if any of the encoder parameters is lower that desired by the encoder.
crypt_subtypes()
This returns all the types supported by the underlaying encoder cross joined with all supported hashes using the string "-pepper-"
(e.g. "argon2id-pepper-sha512-hmac"
), as well as the underlaying types themselves.
verify_password($password, $hash)
This will check if a password matches the hash, supporting both peppered and unpeppered hashed with the encoder.
supported_hashes()
This returns the hashes that are supported for prehashing.
AUTHOR
Leon Timmermans <leont@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2021 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.