Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sub decrypt {
- my $my_string=@_;
- my $cipher = Crypt::CBC->new(
- {
- 'key' => 'length16length16',
- 'cipher' => 'Rijndael',
- 'iv' => '1234567890abcdef',
- 'literal_key' => 1,
- 'padding' => 'null',
- 'header' => 'none',
- keysize => 128 / 8
- }
- );
- my $return = $cipher->decrypt($my_string);
- return $return;
- }
- sub encrypt {
- my $my_string=@_;
- my $cipher = Crypt::CBC->new(
- {
- 'key' => 'length16length16',
- 'cipher' => 'Rijndael',
- 'iv' => '1234567890abcdef',
- 'literal_key' => 1,
- 'padding' => 'null',
- 'header' => 'none',
- keysize => 128 / 8
- }
- );
- my $return = encode_base64($cipher->encrypt($my_string));
- return $return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement