Encryption and decryption using BCryptPasswordEncoder in SpringSecurity

Encryption and decryption using BCryptPasswordEncoder in SpringSecurity

1. Encryption

new BCryptPasswordEncoder().encode(明文密码);

The result of each encryption of the same password is different. The specific reason will not be explained in detail (the reason for the salt value)

2. match

Boolean bool = bCryptPasswordEncoder.matches(明文输入的密码,加密后的密码);

Guess you like

Origin blog.csdn.net/AKALXH/article/details/115395170