aspose file tools
The moose likes Beginning Java and the fly likes Have a problem when encrypt by RSA Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Have a problem when encrypt by RSA" Watch "Have a problem when encrypt by RSA" New topic
Author

Have a problem when encrypt by RSA

ba thong
Greenhorn

Joined: Mar 08, 2009
Posts: 6
I have a method

I write a class test this method

when I execute the minutes each are different results for each
help me please, thanks a lot of
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35443
    
    9
Does "ReadPublicKey("publicReceiver.k")" return the same result each time it is called? If not, then all bets are off.

Note that encrypted stuff is binary data, not text - so an operation like "new String(encrypted stuff)" does not make sense, and will lead to unexpected results.

What do you mean by "when I execute the minutes" - are you running this code several times within a few minutes, or what?


Android appsImageJ pluginsJava web charts
ba thong
Greenhorn

Joined: Mar 08, 2009
Posts: 6
Ulf Dittmer wrote:Does "ReadPublicKey("publicReceiver.k")" return the same result each time it is called? If not, then all bets are off.

Ok it here



Note that encrypted stuff is binary data, not text - so an operation like "new String(encrypted stuff)" does not make sense, and will lead to unexpected results.


I have two method so that show result encrypt and decrypt format String

I continue test, when i write

The result is data1 unlike data2 !! Why ??? hixhix.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Have a problem when encrypt by RSA
 
Similar Threads
problem with RSA..... folks please help!
RSA Cipher
BadPaddingException: Data must start with zero
inputStream freezes
need to generate RSA keys from txt files