Hi All,
I'm just trying to run the example code to test out for functionality, but
I'm getting an error:
Can't call method "encryptblock" on an undefined value at RSA.pm line 97
This is the example code I'm using (straight from CPAN):
-------------------------------------------------------------------------------------------------------------
my $rsa = new Crypt::RSA;
my ($public, $private) =
$rsa->keygen (
Identity => 'Lord Macbeth <[EMAIL PROTECTED]>',
Size => 1024,
Password => 'A day so foul & fair',
Verbosity => 1,
) or die $rsa->errstr();
my $cyphertext =
$rsa->encrypt (
Message => $message,
Key => $public,
Armour => 1,
) || die $rsa->errstr();
my $plaintext =
$rsa->decrypt (
Cyphertext => $cyphertext,
Key => $private,
Armour => 1,
) || die $rsa->errstr();
-------------------------------------------------------------------------------------------------------
This is the line in RSA.pm the error is referring to:
-------------------------------------------------------------------------------------------------------
my $blocksize = blocksize ( $$self{es}->encryptblock (Key => $key),
length($plaintext)
);
-------------------------------------------------------------------------------------------------------
Any ideas of what's going on? or how to test to find out what's going on?
Google didn't produce much help.
--Alex
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm