Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Encryption/Decryption with Perl and Java

by sgifford (Prior)
on May 25, 2006 at 05:35 UTC ( #551510=note: print w/replies, xml ) Need Help??

in reply to Encryption/Decryption with Perl and Java

One guess: it looks like your key is a hex string, and your Java program is converting it to binary, while your Perl program isn't.

If I were debugging this, the next step I'd try is seeing if you can decrypt the string in Java, and encrypt the string in Perl. If both languages can, on their own, encrypt and decrypt the string, that's a good start. Now, if they both produce the same ciphertext, their encryption probably works and their decryption is broken; if they don't, their encryption is most likely broken.

Probably in the process of puzzling through that you'll get the insight you need to find the bug; if not at least it will let you narrow down the source of the problem.

Good luck!

  • Comment on Re: Encryption/Decryption with Perl and Java

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://551510]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2018-06-19 20:38 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (114 votes). Check out past polls.