diff --git a/src/ssn/decryption/decryptChunk.ts b/src/ssn/decryption/decryptChunk.ts index 8c60509..7b7fad0 100644 --- a/src/ssn/decryption/decryptChunk.ts +++ b/src/ssn/decryption/decryptChunk.ts @@ -13,7 +13,7 @@ export default function getDecryptor(decryptionKeys: [number, number, number]) { //decrypt byte const keyPart = (key2 | 2) & 0xFFFF; const decryptedByte = (keyPart * (keyPart ^ 1)) >>> 8; - curChar ^= decryptedByte & 0xFF; + curChar = (curChar ^ (decryptedByte & 0xFF)) & 0xFF; //update keys [key0, key1, key2] = updateKeys([key0, key1, key2], curChar);