You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by arnab <ar...@kolkatacdac.in> on 2007/12/28 11:37:17 UTC

Can't use Crypt::RSA

Hi Everyone,

I'm using a small script to use the Crypt::RSA module under windows using
Active Perl v5.8.8 but it is showing  Perl Command Line Interpreter has
encountered a problem and needs to close...

My script....
#############################
#!/usr/bin/perl
use strict;
use warnings;
use Crypt::RSA;
# Use my to declare variables
my ($crypted, $data, $plain, $private, $public, $rsa);
# Set the data that will be encrypted
$data = "hello";
 
# Create a new RSA object
$rsa = new Crypt::RSA or die "Unable to create RSA object!\r\n";
 
# Generate a public private key pair
($public, $private) = $rsa->keygen(Size => 1024) or
        die "Unable to create key pair!\r\n";
 
undef($rsa); 
########################

Could any body please suggest what may be the parameter for the function
call $rsa->keygen(....

Thanks in advance.

Arnab


-- 
View this message in context: http://www.nabble.com/Can%27t-use-Crypt%3A%3ARSA-tp14524284p14524284.html
Sent from the mod_perl - General mailing list archive at Nabble.com.


Re: Can't use Crypt::RSA

Posted by Randy Kobes <ra...@theoryx5.uwinnipeg.ca>.
On Fri, 28 Dec 2007, Michael Peters wrote:

> Btw, ActiveState seems pretty busted right now for a whole 
> lot of things.
>    http://use.perl.org/~Alias/journal/35219 
> Granted this is 5.10 (mod_perl itself doesn't quite work 
> yet with 5.10) but AS 5.8 has similar problems, just not 
> as many.

For the benefit of ActivePerl users reading this, the
problem raised in http://use.perl.org/~Alias/journal/35219
about not being able to upgrade core modules was addressed
with ppm4:
   http://www.nabble.com/ANNOUNCE:-Beta-of-PPM-version-4-released-td4906225.html
(click on "Show quoted text" to see the release notes),
together with the adjustment of @INC to set C:\Perl\site\lib
before C:\Perl\lib.

See also the note at the top of
    http://ppm.activestate.com/BuildStatus/5.10-A.html
for known issues regarding the state of ActiveState's 10xx
ppm repository.

-- 
best regards,
Randy Kobes

Re: Can't use Crypt::RSA

Posted by Michael Peters <mp...@plusthree.com>.
arnab wrote:
> Hi Everyone,
> 
> I'm using a small script to use the Crypt::RSA module under windows using
> Active Perl v5.8.8 but it is showing  Perl Command Line Interpreter has
> encountered a problem and needs to close...

None of these things has anything to do with mod_perl. Try an Active State or
Windows Perl mailing list instead.

Btw, ActiveState seems pretty busted right now for a whole lot of things.
http://use.perl.org/~Alias/journal/35219
Granted this is 5.10 (mod_perl itself doesn't quite work yet with 5.10) but AS
5.8 has similar problems, just not as many.

-- 
Michael Peters
Developer
Plus Three, LP


Re: Can't use Crypt::RSA

Posted by Jonathan Vanasco <jv...@2xlp.com>.
try using Crypt::OpenSSL::RSA

its a little faster.  there is a memory leak in it, but the max- 
requests directive will make it pretty inconsequential.



On Dec 28, 2007, at 5:37 AM, arnab wrote:

>
> Hi Everyone,
>
> I'm using a small script to use the Crypt::RSA module under windows  
> using
> Active Perl v5.8.8 but it is showing  Perl Command Line Interpreter  
> has
> encountered a problem and needs to close...
>
> My script....
> #############################
> #!/usr/bin/perl
> use strict;
> use warnings;
> use Crypt::RSA;
> # Use my to declare variables
> my ($crypted, $data, $plain, $private, $public, $rsa);
> # Set the data that will be encrypted
> $data = "hello";
>
> # Create a new RSA object
> $rsa = new Crypt::RSA or die "Unable to create RSA object!\r\n";
>
> # Generate a public private key pair
> ($public, $private) = $rsa->keygen(Size => 1024) or
>         die "Unable to create key pair!\r\n";
>
> undef($rsa);
> ########################
>
> Could any body please suggest what may be the parameter for the  
> function
> call $rsa->keygen(....
>
> Thanks in advance.
>
> Arnab
>
>
> -- 
> View this message in context: http://www.nabble.com/Can%27t-use- 
> Crypt%3A%3ARSA-tp14524284p14524284.html
> Sent from the mod_perl - General mailing list archive at Nabble.com.
>