From 2474cec7f04390c196c0f7c753d4b70f1d53fcac Mon Sep 17 00:00:00 2001 From: huliguo <2023611923@qq.com> Date: 星期五, 06 六月 2025 18:43:29 +0800 Subject: [PATCH] 修改bug --- ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java index d0ea2d0..e770059 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/utils/SecurityUtils.java @@ -117,9 +117,15 @@ public static void main(String[] args) { - String s = encryptPassword("0192023a7bbd73250516f069df18b500"); - System.err.println(s); + String myString = "123456"; + String md5String = MD5Generator.generateMD5(myString); + System.err.println("MD5 of '" + myString + "' is: " + md5String); + String encryptPassword = encryptPassword(md5String); -// System.err.println(matchesPassword("c4ca4238a0b923820dcc509a6f75849b", "$2a$10$/7z/wiZ2ejTjD4GQuuyiSe1ptS8uoxrRAUlGCitiLEmpOO78cISeq")); +// a123456 dc483e80a7a0bd9ef71d8cf973673924 $2a$10$FcvtOLhWrHsBv9FsXvNJ2uF4X4KBttT2n.Zuw4wauBUo8HnOcr3PW + System.err.println(encryptPassword); + + System.err.println(matchesPassword(md5String, encryptPassword)); + System.err.println(matchesPassword(md5String, "$2a$10$D2X6q..oHBr6LwaT/RWAluDkE1TEIpoiNz48rpEaeNiJqz9oHhgci")); } } -- Gitblit v1.7.1