NAME

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

VERSION

version 0.018

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

METHODS

new(%args)

This creates a new crypt encoder, it takes named parameters that are all optional.

  • type

    The type of hash, this must be one of the values returned by the crypt_subtypes method. 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 <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.