|
|
@@ -217,9 +217,13 @@ function rsaEncode(j_rsakey, text) {
|
|
|
let JSEncrypt = createJSEncrypt();
|
|
|
let crypt = new JSEncrypt();
|
|
|
crypt.setPublicKey(j_rsakey);
|
|
|
- let md5 = createWMd5();
|
|
|
+ magicJS.logger.info(`rsaEncode1`);
|
|
|
+ let ciphertext = crypt.encrypt(text);
|
|
|
+ magicJS.logger.info(`ciphertext=${ciphertext}`);
|
|
|
+ magicJS.logger.info(`rsaEncode2`);
|
|
|
let CryptoJS = createCryptoJS();
|
|
|
- let base64Data = CryptoJS.enc.Base64.stringify(crypt.encrypt(text)).toString();
|
|
|
+ let base64Data = CryptoJS.enc.Base64.stringify(ciphertext).toString();
|
|
|
+ magicJS.logger.info(`rsaEncode3`);
|
|
|
return b64tohex(base64Data);
|
|
|
}
|
|
|
|
|
|
@@ -236,6 +240,7 @@ async function login(username, password){
|
|
|
}
|
|
|
magicJS.logger.info(`登录1`);
|
|
|
username = rsaEncode(extData.j_rsakey, username);
|
|
|
+ magicJS.logger.info(`登录2`);
|
|
|
password = rsaEncode(extData.j_rsakey, password);
|
|
|
magicJS.logger.info(`username:${username}`);
|
|
|
magicJS.logger.info(`password:${password}`);
|