NAME

Util::Medley::Crypt - Class for simple encrypt/descrypt of strings.

VERSION

version 0.007

SYNOPSIS

my $key = 'abcdefghijklmnopqrstuvwxyz';
my $str = 'foobar';

my $crypt = Util::Medley::Crypt->new;
 
my $encrypted_str = $crypt->encryptStr(
   str => $str,
   key => $key
);

my $decrypted_str = $crypt->decryptStr(
   str => $encrypted_str,
   key => $key
);
 

DESCRIPTION

This class provides a thin wrapper around Crypt::CBC.

All methods confess on error.

ATTRIBUTES

key (optional)

Key to use for encrypting/decrypting methods when one isn't provided through the method calls.

METHODS

decryptStr

Decrypts the provided string.

usage:
my $decrypted_str = $crypt->decryptStr(
      str => $encrypted_str,
    [ key => $key ]
);
     
args:
str [Str]

String you wish to decrypt.

key [Str]

Key that was used to encrypt the string.

encryptStr

Encrypts the provided string.

args:
str [Str]

String you wish to encrypt.

key [Str] (optional)

Key used to encrypt the string.