in reply to same encrypt word ?
#! /Users/XXX/perl5/perlbrew/perls/perl-5.20.0/bin/perl use strict; use lib "/Users/XXX/perl5/perlbrew/perls/perl-5.20.0/lib/site_perl/5.2 +0.0/darwin-2level/Crypt/"; use Crypt::CBC; #use Crypt::Rijndael; my $cipher = Crypt::CBC->new( -key => $ARGV[0], -cipher => 'Rijndael' ); my $ciphertext = $cipher->encrypt("texttoencrypt"); open(my $fh,">",$ARGV[1]); print $fh $ciphertext; close $fh; my $plaintext = $cipher->decrypt($ciphertext); print "ciphertext " , $ciphertext,"\n"; print "plaintext " , $plaintext,"\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: same encrypt word ?
by marto (Cardinal) on Oct 30, 2014 at 11:30 UTC | |
by perlron (Pilgrim) on Oct 30, 2014 at 11:34 UTC | |
|
Re^2: same encrypt word ?
by docofchaos (Novice) on Oct 30, 2014 at 11:32 UTC | |
by perlron (Pilgrim) on Oct 30, 2014 at 11:44 UTC |