NAME
Crypt::Passphrase::Bcrypt - A bcrypt encoder for Crypt::Passphrase
VERSION
version 0.002
METHODS
new(%args)
cost
This is the cost factor that is used to hash passwords.
subtype
2b
This is the subtype the rest of the world has been using since 2014
2y
This type is considered equivalent to
2b
.2a
This is an old and subtly buggy version of bcrypt. This is mainly useful for Crypt::Eksblowfish compatibility.
2x
This is a very broken version that is only useful for compatibility with ancient php versions.
This is
2b
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.