NAME
Crypt::Passphrase::Validator - Base class for Crypt::Passphrase validators
VERSION
version 0.018
DESCRIPTION
This is a base class for validators.
SUBCLASSING
Mandatory methods
It expects the subclass to implement the following methods:
accepts_hash
$validator->accepts_hash($hash)
This method returns true if this validator is able to process a hash. Typically this means that it's crypt identifier matches that of the validator.
verify_password
$validator->verify_password($password, $hash)
This checks if a $password
satisfies $hash
.
Provided methods
It provides the following helper method:
secure_compare
$validator->secure_compare($left, $right)
This compares two strings in a way that resists timing attacks.
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.