NAME

Crypt::Passphrase::Bcrypt - A bcrypt encoder for Crypt::Passphrase

VERSION

version 0.001

METHODS

new(%args)

  • cost

    This is the cost factor that is used to hash passwords.

  • subtype

    This is 2a by default, and you're unlikely to want to change this.

hash_password($password)

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

needs_rehash($hash)

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

crypt_types()

This class supports the following crypt types: 2a and 2.

verify_password($password, $hash)

This will check if a password matches a bcrypt hash.

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.