cipher
This commit is contained in:
@@ -84,12 +84,12 @@ public class BizKeyUtils {
|
||||
return Integer.parseInt(String.valueOf(new Date().getTime()).substring(0, 4));
|
||||
}
|
||||
|
||||
public static String getCipher(String key) {
|
||||
return md5(key + MIX_STRING + key);
|
||||
public static String getCipher(String key,String initTime) {
|
||||
return md5(key +"#"+ MIX_STRING + "#" + initTime);
|
||||
}
|
||||
|
||||
public static Boolean validateCipher(String key,String cipher) {
|
||||
return md5(key + MIX_STRING + key).equals(cipher);
|
||||
public static Boolean validateCipher(String key,String initTime,String cipher) {
|
||||
return md5(key +"#"+ MIX_STRING + "#" + initTime).equals(cipher);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user