I am storing password in encrypted form in mysql. Now when the user logsin back, I am retrieving those values from the table and comparing those values with the encrypted value of the password of the user who is trying to login but the problem is that I am getting different values from my tables.
I have used rs.getString ("password") where password is the field name.
This value is in the table ���7�����]�����7vg� But the retrieved value is ???7???]???7vg?
Because the database is probably using a different character encoding than your Java application. If your encrypted password contains non-text characters, you shouldn't store it in a text-oriented column type (such as VARCHAR) - use a binary column type instead, or convert it to text, for example using Base64 encoding.