-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
function decryptLicense(encryptedLicense, description, serial) {
const hDesc = crypto.createHash('md5').update(description, 'ascii').digest('hex');
const hSerial = crypto.createHash('md5').update(serial, 'ascii').digest('hex');
const textEncoder = new TextEncoder();
const xorKey = textEncoder.encode(hDesc.substring(0, 16));
const xorData = [
textEncoder.encode(hDesc.substring(16, 32)),
textEncoder.encode(hSerial.substring(0, 16)),
textEncoder.encode(hSerial.substring(16, 32)),
];
const decryptionKey = Uint8Array.from(xorBytes(xorKey, xorData, 16));
const buf = stripPadding(createDecipher(decryptionKey).update(encryptedLicense, 'hex')).toString();
return JSON.parse(buf);
}
having with parse
Uncaught SyntaxError: Unexpected token # in JSON at position 0
JSON.parse(buf);
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels