starless has asked for the wisdom of the Perl Monks concerning the following question:
my $cipher = Crypt::CBC->new( -cipher => 'Rijndael' , -key => $key , -iv => $iv , -regenerate_key => 0 , -padding => 'space' , -prepend_iv => 0 ); my $buffer; my $tmpfile = 'somefile'; open(FH_crypted, "<$tmpfile"); binmode FH_crypted; open(FH_decrypted, ">$tmpfile.good"); binmode FH_decrypted; $cipher->start('decrypting'); while (read(FH_crypted,$buffer,1024)) { print FH_decrypted $cipher->crypt($buffer); } print FH_decrypted $cipher->finish; $cipher->finish; close FH_crypted; close FH_decrypted;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trying to decode aes-128-ctr
by AppleFritter (Vicar) on Sep 03, 2014 at 09:39 UTC | |
by starless (Initiate) on Sep 03, 2014 at 09:56 UTC | |
by starless (Initiate) on Sep 03, 2014 at 12:50 UTC | |
|
Re: Trying to decode aes-128-ctr
by Anonymous Monk on Sep 03, 2014 at 09:45 UTC | |
by starless (Initiate) on Sep 03, 2014 at 10:05 UTC | |
|
Re: Trying to decode aes-128-ctr
by flexvault (Monsignor) on Sep 03, 2014 at 18:38 UTC |