Hi monks,
I wanted to encrypt a video/audio file using AES file encryption. I tried the following code , with different combination and tried to get the output, but i was not successful. Can , someone please help me with the multimedia file encryption please
use MIME::Base64;
use Crypt::Rijndael;
use bytes;
use Crypt::CBC;
open (FILE,"<Inception.avi");
$_ = <FILE>;
my $in = decode_base64($_);
print $in ;
my $key = pack("H*", "01020304050607080910111213141516");
# my $cipher = new Crypt::Rijndael $key, Crypt::Rijndael::MODE_CBC or
+die "Error: $!";
# my $cipher = Crypt::CBC->new(-cipher => 'Rijndael',-key=>$key);
$cipher->set_iv(substr($in, 0, 16));
print "\n";
print "out = '", unpack("N/A", $cipher->decrypt(substr($in, 16))),"'\n
+";
#print "out = '", unpack("N/A", $cipher->decrypt($in)), "'\n";
print $cipher;
close FILE;
Thanks in advance