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