| | |
| | | |
| | | public static void main(String[] args) { |
| | | // $2a$10$qofXsM/ZKUMqvysvsWBAfOizecqUdAaXPFUYDVxaYYM0FJg6/mOpq |
| | | String s = SecurityUtils.encryptPassword("111111"); |
| | | String s = SecurityUtils.encryptPassword("123456"); |
| | | System.err.println(s); |
| | | boolean b = SecurityUtils.matchesPassword("111111", "$2a$10$Wx75W2oW23.tsSkvA21QyueQ59iwWwv2ns06Bxubje0ZwPe2wNOQ2"); |
| | | boolean b = SecurityUtils.matchesPassword("123456", "$2a$10$Wx75W2oW23.tsSkvA21QyueQ59iwWwv2ns06Bxubje0ZwPe2wNOQ2"); |
| | | System.err.println(b); |
| | | } |
| | | public boolean reMatches(SysUser user, String rawPassword) |
| | | { |
| | | System.err.println(SecurityUtils.matchesPassword(rawPassword, user.getRePassword())); |
| | | System.err.println(rawPassword); |
| | | System.err.println(user.getRePassword()); |
| | | return SecurityUtils.matchesPassword(rawPassword, user.getRePassword()); |
| | | } |
| | | |