The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Crypt::Passphrase::System - An system crypt() encoder for Crypt::Passphrase

VERSION

version 0.019

SYNOPSIS

 my $passphrase = Crypt::Passphrase->new(encoder => 'System');

DESCRIPTION

This class implements a Crypt::Passphrase encoder around your system's crypt() function.

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.

Configuration

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.

  • salt_size

    This sets the salt size for algorithm, it defaults to something that should be sensible for your algorithm.

Supported crypt types

This returns whatever crypt types it can discover on your system.

AUTHOR

Leon Timmermans <fawaka@gmail.com>

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.