Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Crypt fun

by baku (Scribe)
on Mar 27, 2001 at 00:25 UTC ( #67319=note: print w/ replies, xml ) Need Help??


in reply to Crypt fun

Try upping your paranoia level slightly, see if that gives you more enlightening errors?

my $rsa = new Crypt::RSA (); unless (ref $rsa) { die "Not a reference: $rsa"; } unless ($rsa->isa('Crypt::RSA') { die "Not a Crypt::RSA: $rsa"; } my $checksum; { # scope for temp var my $decrypt = $rsa->can('decrypt'); unless (ref $decrypt) { die "Not a reference: $decrypt"; } unless (ref $decrypt eq 'CODE') { die "Not a coderef: $decrypt"; } $checksum = $decrypt->(Cypertext => $encrypted, Key => $public_key, Armour => 1, ) or die "Can't decrypt: " . $rsa->errstr(); } unless ($checksum) { die "No checksum after decrypt"; }

At least this may pinpoint the problem more precisely...?


Comment on Re: Crypt fun
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://67319]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-04 11:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (59 votes), past polls