The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Crypt::Passphrase::Validator - Base class for Crypt::Passphrase validators

VERSION

version 0.014

DESCRIPTION

This is a base class for validators. It requires any subclass to implement the following two methods:

METHODS

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($password, $hash)

This checks if a $password satisfies $hash.

It provides the following helper method:

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.