Class::Usul::Crypt::Util - Decrypts / encrypts passwords from / to configuration files
use Class::Usul::Crypt::Util qw(decrypt_from_config); $password = decrypt_from_config( $encrypted_value_from_file );
Decrypts/Encrypts password from/to configuration files
Implements a functional interface
$plain_text = decrypt_from_config( $params, $password );
Strips the {Twofish2} prefix and then decrypts the password
{Twofish2}
$encrypted_value = encrypt_for_config( $params, $plain_text );
Returns the encrypted value of the plain value prefixed with {Twofish2} for storage in a configuration file
$cipher = get_cipher( $encrypted_value );
Returns the name of the cipher used to encrypt the value
$bool = is_encrypted( $password_or_encrypted_value );
Return true if the passed argument matches the pattern for an encrypted value
($cipher, $password) = __extract_crypt_params( $encrypted_value );
Extracts the cipher name and the encrypted password from the value stored in the configuration file. Returns the default cipher and null if the encrypted value does not match the proper pattern. The default cipher is specified by the default cipher function
\%crypt_args = __get_crpyt_args( $params, $cipher );
Returns the argument hash ref passed to "encrypt" in Class::Usul::Crypt and "decrypt" in Class::Usul::Crypt
None
There are no known incompatibilities in this module
There are no known bugs in this module. Please report problems to the address below. Patches are welcome
Larry Wall - For the Perl programming language
Peter Flanigan, <pjfl@cpan.org>
<pjfl@cpan.org>
Copyright (c) 2016 Peter Flanigan. All rights reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic
This program is distributed in the hope that it will be useful, but WITHOUT WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
To install Class::Usul, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Usul
CPAN shell
perl -MCPAN -e shell install Class::Usul
For more information on module installation, please visit the detailed CPAN module installation guide.