|
@@ -1,16 +1,16 @@
|
|
|
-const key = window.key||'6WpHp4vSvLVQK8SLioNZ7WMq'; //eta
|
|
|
-// const key = 'cJ3b1I4YBlTc85vnxy36xip2'; //逸诺
|
|
|
-// const key = 'bvS3kVp7QIZoD70fPk1wk41n'; //试用
|
|
|
+let key = ''; //eta
|
|
|
|
|
|
class CryptoJS {
|
|
|
// 3DES加密,CBC/PKCS5Padding
|
|
|
- static Des3Encrypt (input) {
|
|
|
+ static Des3Encrypt (input,keyVal) {
|
|
|
+ key=keyVal
|
|
|
let genKey = genkey(key, 0, 24);
|
|
|
return base64encode(des(genKey.key, input, 1, 1, key.substr(0, 8), 1));
|
|
|
}
|
|
|
|
|
|
// 3DES解密,CBC/PKCS5Padding
|
|
|
- static Des3Decrypt (input) {
|
|
|
+ static Des3Decrypt (input,keyVal) {
|
|
|
+ key=keyVal
|
|
|
let genKey = genkey(key, 0, 24);
|
|
|
return des(genKey.key, base64decode(input), 0, 1, key.substr(0, 8), 1);
|
|
|
}
|