T
thedifferenZ
Hi group,
I am trying to encrypt/decrypt a data file using asymmetic keys. I
tried using Crypt:RSA (Blowfish)
The source file is just 500kb, and its taking more than 20 mins to
encrypt it. Is there any way to encrypt a file with out taking whole
file content to memory?
========================================================
use strict;
use Crypt::RSA;
my $rsa = new Crypt::RSA;
my $public = new Crypt::RSA::Key:
ublic(Filename => 'public.txt');
my $private = new Crypt::RSA::Key:
rivate(Filename => 'private.txt');
open(DAT,"data.mpg");
my $message;
while(<DAT>){
$message.=$_;
}
close(DAT);
my $cyphertext = $rsa->encrypt (
Message => $message,
Key => $public,
Armour => 1,
) || die $rsa->errstr();
open(WRT,">encrypted.txt");
print WRT $cyphertext;
close(WRT);
========================================================
thanks
I am trying to encrypt/decrypt a data file using asymmetic keys. I
tried using Crypt:RSA (Blowfish)
The source file is just 500kb, and its taking more than 20 mins to
encrypt it. Is there any way to encrypt a file with out taking whole
file content to memory?
========================================================
use strict;
use Crypt::RSA;
my $rsa = new Crypt::RSA;
my $public = new Crypt::RSA::Key:
my $private = new Crypt::RSA::Key:
open(DAT,"data.mpg");
my $message;
while(<DAT>){
$message.=$_;
}
close(DAT);
my $cyphertext = $rsa->encrypt (
Message => $message,
Key => $public,
Armour => 1,
) || die $rsa->errstr();
open(WRT,">encrypted.txt");
print WRT $cyphertext;
close(WRT);
========================================================
thanks