This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes RSA Encryption / Decryption does not work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "RSA Encryption / Decryption does not work" Watch "RSA Encryption / Decryption does not work" New topic
Author

RSA Encryption / Decryption does not work

Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 114
Hello,
to try out Java security features I have written the following class (I know I would not be really usefull, just for trying the API):



I call it with the following code



However the original messages is not restored.
decrypted contains a String of zero-length.

Where is the mistake??

Thanks for any input,

Hans
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20077
    
  30

Check out line 22.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 114
I must be blind...

Thanks a lot

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 20077
    
  30

You're welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RSA Encryption / Decryption does not work
 
It's not a secret anymore!