spring-security隨即鹽加密
阿新 • • 發佈:2019-08-29
示例demo
public static void main(String[] args) { String password = new BCryptPasswordEncoder().encode("123456789"); String password2 = new BCryptPasswordEncoder().encode("123456789"); System.out.println(password); System.out.println(password2); boolean flag = new BCryptPasswordEncoder().matches("123456789",password2); System.out.println(flag); }