| | |
| | | |
| | | public static void main(String[] args) { |
| | | BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(); |
| | | String phone="19987654321"; |
| | | System.out.println(encoder.encode(DigestUtils.md5Hex(phone.substring(phone.length() - 6)))); |
| | | String phone="19923261698"; |
| | | String encodePassword =encoder.encode(DigestUtils.md5Hex(phone.substring(phone.length() - 6))); |
| | | System.out.println(encodePassword); |
| | | System.out.println(DigestUtils.md5Hex("12345aA!")); |
| | | |
| | | System.out.println(DigestUtils.md5Hex("358736")); |
| | | |
| | | System.out.println(encoder.matches(DigestUtils.md5Hex("358736"), "$2a$10$lChcCpt1hN77IFSavrsXHe39hox4ggGlJZxuf7AHZ3y2qRbiJjPUy")); |
| | | System.out.println(encoder.matches(DigestUtils.md5Hex("261698"), encodePassword)); |
| | | } |
| | | } |