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::PassphraseHash - An object representing a hash for password checking

VERSION

version 0.019

DESCRIPTION

This class can be useful for plugging Crypt::Passphrase into some frameworks (e.g. ORMs) that require a singular object to contain everything you need to match passwords against. Effectively it's little more or less than currying the $hash parameter to verify_password and needs_rehash.

METHODS

new

 Crypt::Passphrase::PassphraseHash->new($crypt_passphrase, $raw_hash)

This takes a Crypt::Passphrase object, and a hash string. You probably want to use the curry_with_hash or curry_with_password methods on Crypt::Passphrase instead of calling this directly. Typically called by Crypt::Passphrase->curry_with_hash($hash) instead of directly.

verify_password

 $hash->verify_password($password)

Verify that the password matches the hash in this object.

needs_rehash

 $hash->needs_rehash

Check if the hash needs to be rehashed.

raw_hash

 $hash->raw_hash

This returns the hash contained in this object as a string.

SEE ALSO

AUTHOR

Leon Timmermans <fawaka@gmail.com>

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.