let t = "3iABpTydzoJoHFEp6hcE3hrvh1hoh6r0Z2H4JeQBQ6yBw8oibq0NgV1P4CEdhaTc4CFiDcjOstzrU4IRc5Dz+cuPHMyuKj/mQaCgmHw/hS+ZSt8u53SkFEbJwV9o3+q2i7zIWIZzfo85N8+84kQ6+1qT362rZwdPSBNQ6O4eH15Cqveapvbd3/eWR2/cAVTaz84KEcDMDJr7Rw+O/lmWtxFXg3GmV5QiLJTdS3AbBPXC1Yndr0pQRaycWdZmEjqzgRL825TqspKKBJ94dzRSjkx+qva25Z+9RfFSEDB8eHkbo5WS0lvMAI3Ly55gLhPWVPQXVdLCZaSlOAa+No90vXeAYT+3YkAMUcp7TvcbKgw="
let a = 'client.config.sso.password.encryptKey'
this.publicEncrypt = new JSEncrypt();
let publicKey = JSON.parse(decryptBase64AES(t))[a]
this.publicEncrypt.setPublicKey(publicKey)
console.log(deepCloneWithoutArrays({
keys:['client.config.sso.password.encryptKey'],
systemCode:"PCM",
type:1
}))
function getRsaPassword() {
if (!this.publicEncrypt)
return '';
let t = {
password: '123456',
timestamp: new Date().getTime()
};
try {
let e = this.publicEncrypt.encrypt(JSON.stringify(t));
console.log(e)
return e
} catch (error) {
return error
}
}
function decryptBase64AES(t) {
const key = CryptoJS.enc.Utf8.parse("3RH5TW851TQMN0NQ");
const decrypted = CryptoJS.AES.decrypt(
CryptoJS.enc.Base64.stringify(CryptoJS.enc.Base64.parse(t)),
key,
{
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
}
);
return decrypted.toString(CryptoJS.enc.Utf8);
}
function hashSalt() {
let key = 'client.config.oversea.hash.salt'
let hashKey = "3iABpTydzoJoHFEp6hcE3s0gPtOFGSAwtgTicYRyx3tV2dYwA5dIpvsfNEtJvS24/u0bj3FREeTWQrtguo+q9IuBU7f/X+Y9gBNMkj2xtRz9277MjIH8+t4QEWpnExU+R2y9IYgRENVA0grZdI2IRw=="
let hashSalt = JSON.parse(decryptBase64AES(hashKey))[key]
let phone = '18888888881'
let hash = CryptoJS.SHA256(phone + hashSalt)
const base64Hash = hash.toString(CryptoJS.enc.Base64);
console.log(base64Hash)
}
function generateRandomTimestampString() {
var characters = ["a", "B", "6", "D", "1", "g", "s", "K", "m", "t", "5"];
var randomCharIndex = Math.floor(Math.random() * characters.length);
var insertPosition = Math.floor(Math.random() * 5) + 1;
var timestamp = Date.now().toString();
var result = timestamp.slice(0, insertPosition) + characters[randomCharIndex] + timestamp.slice(insertPosition);
console.log(result);
return result;
}
function deepCloneWithoutArrays(input) {
var result = {};
if (Array.isArray(input)) {
return result;
}
for (var key in input) {
var value = input[key];
if (typeof value === 'object' && !Array.isArray(value) && value !== null) {
result[key] = deepCloneWithoutArrays(value);
} else {
result[key] = value;
}
}
return result;
}
console.log(md5('0=client.config.oversea.hash.salt&systemCode=PCM&type=1&xappnonce=11753260654972&xappplatform=6&xapptimes=175g3260654972&xappuuids=17532m60654972'))
console