NAME
Egg::Plugin::Crypt::CBC - Crypt::CBC for Egg Plugin.
SYNOPSIS
use Egg qw/ Crypt::CBC /;
__PACKAGE__->egg_startup(
.....
...
plugin_crypt_cbc => {
cipher=> 'Blowfish',
key => 'uniqueid',
...
},
);
# The text is encrypted.
my $crypt= $e->cbc->encode($text);
# The code end text is decrypted.
my $plain= $e->cbc->decode($crypt);
# The cbc object is acquired in an arbitrary option.
my $cbc= $e->cbc( cipher => 'DES' );
DESCRIPTION
It is a plugin to use the code and decoding by Crypt::CBC.
CONFIGURATION
HASH is defined in 'plugin_crypt_cbc' key and it sets it.
The setting is an option to pass everything to Crypt::CBC.
Please refer to the document of Crypt::CBC for details.
cipher
The exception is generated in case of undefined.
key
The exception is generated in case of undefined.
iv
'$KJh#(}q' is provisionally defined in case of undefined.
Please define it.
padding
Default is 'standard'.
prepend_iv
Default is 0.
regenerate_key
Default is 1.
METHODS
cbc ( [OPTION_HASH] )
The handler object of this plugin is returned.
It turns by using the same object when the object is generated once usually. When OPTION_HASH is given, it tries to generate the object newly.
HANDLER METHODS
The handler object has succeeded to Crypt::CBC.
new
Constructor.
encode ( [PLAIN_TEXT] )
After PLAIN_TEXT is encrypted, the Base64 encode text is returned.
my $crypt_text= $e->cbc->encode( 'plain text' );
decode ( [CRYPT_TEXT] )
The text encrypted by 'encode' method is made to the compound and returned.
my $plain_text= $e->cbc->decode( 'crypt text' );
SEE ALSO
AUTHOR
Masatoshi Mizuno <lushe@cpan.org>
COPYRIGHT
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.