• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RSA Encryption / Decryption does not work

 
Markus Schmider
Ranch Hand
Posts: 132
1
  • 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
Pie
Posts: 20661
65
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: 132
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I must be blind...

Thanks a lot

 
Rob Spoor
Sheriff
Pie
Posts: 20661
65
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