Crypt-Skipjack
view release on metacpan or search on metacpan
examples/cbc-mode view on Meta::CPAN
#!/usr/local/bin/perl
use diagnostics;
use strict;
use warnings;
use Crypt::CBC; # CBC automatically loads Anubis for us
my $key = pack "H20", "00998877665544332211";
my $IV = pack "H16", 0;
my $cipher = Crypt::CBC->new({'key' => $key,
'cipher' => 'Skipjack',
'iv' => $IV,
'regenerate_key' => 1,
'padding' => 'standard',
'prepend_iv' => 0
});
my $plaintext1 = pack "H16", "33221100ddccbbaa";
print "plaintext1 : ", unpack("H*", $plaintext1), "\n";
my $ciphertext1 = $cipher->encrypt($plaintext1);
print "ciphertext1 : ", unpack("H*", $ciphertext1), "\n";
my $plaintext2 = $cipher->decrypt($ciphertext1);
print "plaintext2 : ", unpack("H*", $plaintext2), "\n";
( run in 0.733 second using v1.01-cache-2.11-cpan-e1769b4cff6 )