Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: RSA encryption on Win32

by a (Friar)
on Feb 27, 2001 at 11:20 UTC ( [id://61050]=note: print w/replies, xml ) Need Help??


in reply to RSA encryption on Win32

I tried it (I think) and get "out of memory". Is there some reason for the obfusticated code? What does:
($r,$t)=&bdiv($r,256),$_=pack(C,$t).$_ while$w--+1-2*$d;
become? ($w--)+1-(2*$d)??

a

Replies are listed 'Best First'.
(tye)Re: RSA encryption on Win32
by tye (Sage) on Feb 27, 2001 at 12:54 UTC

    Yeah, it is a bit obfuscated, but not too much. The $w--+1-2*$d means that it outputs one extra byte per group when encrypting ($d==0) and then strips that extra byte per group when decrypting ($d==1 because the script specified -s to perl and you specified -d to the script).

    Stepping through the algorythm, it appears at least close. I haven't had time to debug the problem, though. If I could find a better all-Perl implementation of this, I might be able to compare the behavior of the two and figure out the problem.

            - tye (but my friends call me "Tye")

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-16 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found