0

I use a jPasswordField while taking input for password while users register. when the users login again i take the input by jPasswordField. the password gets stored in mysql database in encrypted format like [C@44f8e869 , [C@595d0d9c etc . how can i authenticate the password ? . is there a neccessity to decrpyt the password by retriving it from mysql database, if so how can i do it?

gm lohith
  • 33
  • 4
  • 1
    No need to decrypt the password but you should use the same process with the same key you stored. Also, check these links: https://stackoverflow.com/a/326706 - https://security.stackexchange.com/a/31846 – ali ghasemzad Nov 23 '20 at 07:38
  • @alighasemzad here I'm not hashing the password on my own or encrypting it, it automatically get stored in the above format. how can i resolve it? – gm lohith Nov 23 '20 at 08:24
  • 1
    one way can be: decrypt the jPasswordField result in a method before insertion, use proper encryption and hashing method then save it in the database. You can use the same method to validate the password later for login or any other usecases. – ali ghasemzad Nov 23 '20 at 09:09

0 Answers0