Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RSA Encryption / Decryption does not work  RSS feed

 
Markus Schmider
Ranch Hand
Posts: 147
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out line 22.
 
Markus Schmider
Ranch Hand
Posts: 147
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I must be blind...

Thanks a lot

 
Rob Spoor
Sheriff
Posts: 20893
81
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're welcome
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!