Showing
1 changed file
with
1 additions
and
3 deletions
@@ -84,9 +84,7 @@ public class SecurityTool { | @@ -84,9 +84,7 @@ public class SecurityTool { | ||
84 | return buf.toString(); | 84 | return buf.toString(); |
85 | } | 85 | } |
86 | 86 | ||
87 | - public static String getPassword(String account, String origalPassword, String salt) { | ||
88 | - // 将原始密码加密成md5 | ||
89 | - String md5pass = encode("MD5",origalPassword); | 87 | + public static String getPassword(String account, String md5pass, String salt) { |
90 | //用户在数据库中存储的数据为:md5(sha1(account + salt) + md5pass) | 88 | //用户在数据库中存储的数据为:md5(sha1(account + salt) + md5pass) |
91 | String encodePass = encode("MD5", encode("SHA1",account + salt) + md5pass); | 89 | String encodePass = encode("MD5", encode("SHA1",account + salt) + md5pass); |
92 | return encodePass; | 90 | return encodePass; |
-
Please register or login to post a comment