piyush.shourie has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am using Crypt::RSA module, but I am encountering a very peculiar error. Please refer to the following code snippet.

use Crypt::RSA; my $message="This is a sample message."; my $rsa = new Crypt::RSA; my ($public, $private) = $rsa->keygen ( Identity => 'Piyush Shourie <piyush_shourie@infosys.com>', Size => 1024, Password => 'A day so foul & fair', Verbosity => 1, ) or die "1".$rsa->errstr();

The following error message results:
PARI: *** forbidden division t_REAL % t_INT. at C:/Perl/site/lib/Crypt/Random.pm line 93.

Any insight into the cause of this error message and method to correct this behaviour will be highly appreciated.

Regards, PS

Replies are listed 'Best First'.
Re: Error while using Crypt::RSA module
by PodMaster (Abbot) on Oct 13, 2004 at 02:56 UTC
    Any insight into the cause of this error message and method to correct this behaviour will be highly appreciated.
    The cause of the error message is obvious (look at line 93). The error messages comes from Math::PARI. The solution is not obvious. If i were you i'd try out a bunch of different versions of Math::PARI until you find one that works (the lastest works for me).

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.