Egg::Plugin::Crypt::CBC - Crypt::CBC for Egg Plugin.


Egg-Plugin-Crypt-CBC documentation  | view source Contained in the Egg-Plugin-Crypt-CBC distribution.

Index


NAME

Top

Egg::Plugin::Crypt::CBC - Crypt::CBC for Egg Plugin.

SYNOPSIS

Top

  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

Top

It is a plugin to use the code and decoding by Crypt::CBC.

CONFIGURATION

Top

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

Top

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

Top

The handler object has succeeded to Crypt::CBC.

new

Top

Constructor.

encode ( [PLAIN_TEXT] )

Top

After PLAIN_TEXT is encrypted, the Base64 encode text is returned.

  my $crypt_text= $e->cbc->encode( 'plain text' );

decode ( [CRYPT_TEXT] )

Top

The text encrypted by 'encode' method is made to the compound and returned.

  my $plain_text= $e->cbc->decode( 'crypt text' );

SEE ALSO

Top

Egg::Release, Crypt::CBC,

AUTHOR

Top

Masatoshi Mizuno <lushe&64;cpan.org>

COPYRIGHT AND LICENSE

Top


Egg-Plugin-Crypt-CBC documentation  | view source Contained in the Egg-Plugin-Crypt-CBC distribution.