Verifying Hashed Password From MySQL Database

馋奶兔 提交于 2019-12-05 18:16:48

I'm not familiar with Java, but it seems to me that you got the value from the password input field the wrong way, maybe you should check this out:

// In the registration form
passwordField.toString()

// In the login form
passwordField.getText()

I suspect that you are introducing error into the hash either when storing it in the database or retrieving it, or both.

Try storing a hash in the database and retrieving it non-programmatically to compare it with the hash you generated. If they're identical, try retrieving it programmatically and compare it to see if there was any error introduced.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!