jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
When I execute this I get the following message: n is not a number.#! /usr/bin/perl use warnings; use Crypt::RSA ; my $rsa = new Crypt::RSA; my ($public, $private) = $rsa->keygen ( Identity => 'Luca Da Luca <luca@daLuca.com> ', Size => 512, Password => 'A day so foul & fair', Verbosity => 1, ) or die $rsa->errstr(); $public->write(Filename => 'rsa.public' ); $private->write(Filename => 'rsa.private' ); $public = new Crypt::RSA::Key::Public ( Filename => 'rsa.public'); $private = new Crypt::RSA::Key::Private( Filename => 'rsa.private' ) +; $message = "Hallo allemaal :)) \n" ; 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(); print "text: $plaintext\n" ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Crypt::RSA problem
by graff (Chancellor) on Sep 26, 2005 at 12:55 UTC | |
by jeanluca (Deacon) on Sep 26, 2005 at 13:12 UTC | |
by jeanluca (Deacon) on Sep 26, 2005 at 13:34 UTC |