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::Argon2::Encrypted - A base-class for encrypting/peppered Argon2 encoders for Crypt::Passphrase

VERSION

version 0.009

DESCRIPTION

This is a base-class for pre-peppering implementations. You probably want to use Crypt::Passphrase::Argon2::AES instead.

METHODS

new()

This constructor takes all arguments also taken by Crypt::Passphrase::Argon2, with the following additions: cipher (the name of the used cipher) and active (the identifier of the active pepper).

hash_password($password)

This hashes the passwords with argon2 according to the specified settings and a random salt (and will thus return a different result each time).

verify_password($password, $hash)

This will check if a password matches an encrypted or unencrypted argon2 hash.

needs_rehash($hash)

This returns true if the hash uses a different cipher or subtype, or if any of the parameters is lower that desired by the encoder.

recode_hash($input, $to = $active)

This recrypts the hash in $input to the key identified by $to, if it's not already.

crypt_subtypes()

This class supports at all types supported by Crypt::Argon2, with and without a '-encrypted' postfix.

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.