Crypt::Passphrase::System - An system crypt() encoder for Crypt::Passphrase
version 0.019
my $passphrase = Crypt::Passphrase->new(encoder => 'System');
This class implements a Crypt::Passphrase encoder around your system's crypt() function.
crypt()
Note that the supported algorithms depend entirely on your platform. The only option portable among unices (descrypt) is not considered safe at all. It will try to pick a good default among the supported options. Because the different algorithms take different parameters they will have to be passed as a settings string if anything else is desired.
By default it uses the first supported algorithm in this list: yescript, scrypt, bcrypt, SHAcrypt, MD5crypt and descrypt.
yescript
scrypt
bcrypt
SHAcrypt
MD5crypt
descrypt
It takes the following arguments for configuration:
type
The type of hash, this must be one of the values supported by the system. If none is given it is picked as described above.
settings
The settings used for hashing the password, e.g. '$1$', '$2b$12$', '$6$rounds=65600$', '$7$DU..../....' or '$y$j9T$'. If you don't know what these mean you probably shouldn't touch this parameter. It defaults to something appropriate for your chosen / default algorithm.
'$1$'
'$2b$12$'
'$6$rounds=65600$'
'$7$DU..../....'
'$y$j9T$'
salt_size
This sets the salt size for algorithm, it defaults to something that should be sensible for your algorithm.
This returns whatever crypt types it can discover on your system.
Leon Timmermans <fawaka@gmail.com>
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.
To install Crypt::Passphrase, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Crypt::Passphrase
CPAN shell
perl -MCPAN -e shell install Crypt::Passphrase
For more information on module installation, please visit the detailed CPAN module installation guide.