|
|
|
@ -22,8 +22,8 @@ export default { |
|
|
|
|
decrypt(word) { // 解密
|
|
|
|
|
var key = CryptoJS.enc.Utf8.parse(keyStr) |
|
|
|
|
// var srcs = CryptoJS.enc.Utf8.parse(word)
|
|
|
|
|
if(word) { |
|
|
|
|
word = word.replace(/[\r\n]/g,"") |
|
|
|
|
if (word) { |
|
|
|
|
word = word.replace(/[\r\n]/g, "") |
|
|
|
|
} |
|
|
|
|
var decrypt = CryptoJS.AES.decrypt(word, key, { |
|
|
|
|
mode: CryptoJS.mode.ECB, |
|
|
|
@ -56,8 +56,13 @@ export default { |
|
|
|
|
// return decrypt.decrypt(secretWord);
|
|
|
|
|
// },
|
|
|
|
|
md5Salt(str) { |
|
|
|
|
console.log('hahahahaha',str, str + "Do&9hY%l8e", md5(str + 'Do&9hY%l8e')) |
|
|
|
|
return md5(str + 'Do&9hY%l8e') |
|
|
|
|
// console.log('hahahahaha',str, str + "Do&9hY%l8e", md5(str + 'Do&9hY%l8e'))
|
|
|
|
|
// str ='fd3fc615-3554-4ff5-8848-364577e8687d'
|
|
|
|
|
console.log('hahahahaha', str, str + "kdq*&qflbn1gga?aDq", md5(str + 'kdq*&qflbn1gga?aDq')) |
|
|
|
|
console.log('\n\n------ begin: ------') |
|
|
|
|
console.log("md5(str + 'kdq*&qflbn1gga?aDq')", md5(str + 'kdq*&qflbn1gga?aDq')) |
|
|
|
|
console.log('------ end: ------\n\n') |
|
|
|
|
return md5(str + 'kdq*&qflbn1gga?aDq') |
|
|
|
|
}, |
|
|
|
|
md5NoSalt(str) { |
|
|
|
|
return md5(str) |
|
|
|
@ -76,4 +81,4 @@ export default { |
|
|
|
|
return uuid |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |