NAME

Crypt::Passphrase::Encoder - Base class for Crypt::Passphrase encoders

VERSION

version 0.016

DESCRIPTION

This is a base class for password encoders. It is a subclass of Crypt::Passphrase::Validator.

METHODS

hash_password($password)

This hashes a password. Note that this will return a new value each time since it uses a unique hash every time.

needs_rehash($hash)

This method will return true if the password needs a rehash. This may either mean it's using a different hashing algoritm, or because it's using different parameters. This should be overloaded in your subclass.

crypt_subtypes()

This method returns the types of crypt entries this validator supports. This is used to implement accepts_hash.

binary_safe()

This method returns true if the encoder can take arbitrary binary inputs.

random_bytes($count)

This is a utility method provided by the base class to aid in generating a good salt.

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.