View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Peter Flanigan > Class-Usul > Class::Usul::Crypt::Util



Annotate this POD



Open  0
View/Report Bugs
Module Version: v0.84.1   Source  

Name ^

Class::Usul::Crypt::Util - Decrypts / encrypts passwords from / to configuration files

Synopsis ^

   use Class::Usul::Crypt::Util qw(decrypt_from_config);

   $password = decrypt_from_config( $encrypted_value_from_file );

Description ^

Decrypts/Encrypts password from/to configuration files

Configuration and Environment ^

Implements a functional interface

Subroutines/Functions ^


   $plain_text = decrypt_from_config( $params, $password );

Strips the {Twofish2} prefix and then decrypts the password


   $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

Diagnostics ^


Dependencies ^


Incompatibilities ^

There are no known incompatibilities in this module

Bugs and Limitations ^

There are no known bugs in this module. Please report problems to the address below. Patches are welcome

Acknowledgements ^

Larry Wall - For the Perl programming language

Author ^

Peter Flanigan, <>

License and Copyright ^

Copyright (c) 2018 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

syntax highlighting: