SpringSecurity の BCryptPasswordEncoder を使用した暗号化と復号化 |
1. 暗号化
new BCryptPasswordEncoder().encode(明文密码);
同じパスワードでもそれぞれの暗号化結果が異なりますが、具体的な理由は詳しく説明しません(ソルト値の理由)
2.マッチ
Boolean bool = bCryptPasswordEncoder.matches(明文输入的密码,加密后的密码);
SpringSecurity の BCryptPasswordEncoder を使用した暗号化と復号化 |
1. 暗号化
new BCryptPasswordEncoder().encode(明文密码);
同じパスワードでもそれぞれの暗号化結果が異なりますが、具体的な理由は詳しく説明しません(ソルト値の理由)
2.マッチ
Boolean bool = bCryptPasswordEncoder.matches(明文输入的密码,加密后的密码);