getBytes() - Encoding Style problem
843811Jun 18 2007 — edited Jun 19 2007Hi people,
I need to encrypt a password using SHA algorithm through the MessageDigest object. Initially, I need obtain the bytes of the password String in order to pass it to the update() method of the mentioned object.
The problem is that the getBytes() method return different values on different platforms. I am using Windows and Sun Solaris OSs. I also noticed that even on the same OS, changing the jdk version will return in different result for the same String.
Could you please help me with this issue because it is getting very frustrating.
Regards George