Spring Security Encrypt MD5

前端 未结 3 1208
耶瑟儿~
耶瑟儿~ 2021-01-31 11:09

I have a java web application using spring framework and spring security for its login. In my database I have my passwords encrypted to MD5 before being saved. I added in my app

3条回答
  •  情话喂你
    2021-01-31 11:58

    Have you read 6.3.3 Hashing and Authentication section from Spring Security reference manual? It mentioned some possible issues that you might encounter in using password hashing.

    Some possibilities it listed:

    • Database password hash might be in Base64, while the result from MD5PasswordEncoder is in hexadecimal strings
    • Your password hash might be in upper-case, while the result from the encoder is in lower case strings

提交回复
热议问题