Crypt::Passphrase::Yescrypt - A yescrypt encoder for Crypt::Passphrase
version 0.001
This class implements an yescrypt encoder for Crypt::Passphrase. yescrypt was one of the finalists of 2015's Password Hash Competition and as such is considered a safe algorithm for passwords.
This creates a new yescrypt encoder, it takes named parameters that are all optional. Note that some defaults are likely to change at some point in the future, as computers get progressively more powerful and cryptoanalysis gets more advanced.
block_size
The number of 128 byte units in a block. Reasonable values are from 8 to 96. It default to 32 (4kiB).
8
96
32
4kiB
block_count
The log₂ of the number of blocks that will be used. It defaults to 12 for 4096 blocks and may change in the future.
12
4096
parallelism
The number of threads used for the hash. This defaults to 1, and you're unlikely to want to change this.
1
time
This is the time parameter that the algorithm to use up more time. This default to 0 and should only be used when using more memory isn't an option.
0
flags
This flags that determine the flavor of yescrypt. It defaults to 0xb6 and unless you know what you're doing you shouldn't be touching this.
0xb6
salt_size
The size of the salt. This defaults to 16 bytes, which should be more than enough for any use-case.
16
Note: there is no wrong or right configuration, it all depends on your own particular circumstances.
This hashes the passwords with yescrypt according to the specified settings and a random salt (and will thus return a different result each time).
This returns true if the hash uses a different cipher or subtype, or if any of the parameters are different from that desired by the encoder.
This class supports the following crypt types: y and 7.
y
7
This will check if a password matches a yescrypt hash.
Leon Timmermans <leont@cpan.org>
This software is copyright (c) 2023 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.
To install Crypt::Passphrase::Yescrypt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::Passphrase::Yescrypt
CPAN shell
perl -MCPAN -e shell install Crypt::Passphrase::Yescrypt
For more information on module installation, please visit the detailed CPAN module installation guide.