encryption-for-node
Version:
Portable Crypto libraries for Node and Browsers
1,538 lines • 99.8 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SERPENT = void 0;
function rotr(value, shift) {
shift &= 31; // make sure shift is between 0 and 31
if (shift === 0) {
return value;
}
const return_value = ((value >>> shift) | (value << (32 - shift))) >>> 0;
return return_value;
}
function rotl(value, shift) {
shift &= 31; // make sure shift is between 0 and 31
if (shift === 0) {
return value;
}
const return_value = ((value << shift) | (value >>> (32 - shift))) >>> 0;
return return_value;
}
function readUInt32LE(array, index) {
return (((array[index + 3] & 0xFF) << 24) |
((array[index + 2] & 0xFF) << 16) |
((array[index + 1] & 0xFF) << 8) |
(array[index] & 0xFF)) >>> 0;
}
function writeUInt32LE(array, value, index) {
array[index] = value & 0xFF;
array[index + 1] = (value >> 8) & 0xFF;
array[index + 2] = (value >> 16) & 0xFF;
array[index + 3] = (value >> 24) & 0xFF;
}
function isBufferOrUint8Array(obj) {
return obj instanceof Uint8Array || (typeof Buffer !== 'undefined' && obj instanceof Buffer);
}
function isBuffer(obj) {
return (typeof Buffer !== 'undefined' && obj instanceof Buffer);
}
function extendUint8Array(array, newLength, padValue) {
const newArray = new Uint8Array(newLength);
newArray.set(array);
for (let i = array.length; i < newLength; i++) {
newArray[i] = padValue;
}
return newArray;
}
function concatenateUint8Arrays(arrays) {
const totalLength = arrays.reduce((length, array) => length + array.length, 0);
const concatenatedArray = new Uint8Array(totalLength);
let offset = 0;
for (let i = 0; i < arrays.length; i++) {
concatenatedArray.set(arrays[i], offset);
offset += arrays[i].length;
}
return concatenatedArray;
}
function xor(buf1, buf2) {
let number = -1;
const bufResult = buf1.map((b) => {
if (number != buf2.length - 1) {
number = number + 1;
}
else {
number = 0;
}
return b ^ buf2[number];
});
return bufResult;
}
function align(a, n) {
var a = a % n;
if (a) {
return (n - a);
}
else {
return 0;
}
}
function removePKCSPadding(buffer, number, PKCS = false) {
const lastByte = buffer[buffer.length - 1];
if (PKCS == true) {
return buffer.subarray(0, buffer.length - lastByte);
}
else if (lastByte != number) {
return buffer;
}
else {
var len = buffer.length;
for (let i = buffer.length - 1; i > 0; i--) {
if (buffer[i] == number) {
len--;
}
}
return buffer.subarray(0, len);
}
}
/**
* Serpent encryption.
*
* 16, 24 or 32 bytes key, 16 byte IV
*
* Example:
* ```
* const cipher = new SERPENT();
* // Key for browser
* const encoder_key = new TextEncoder();
* const key = encoder_key.encode("0123456789ABCDEF");
* cipher.set_key(key)
* // Key for node
* const key = Buffer.from("0123456789ABCDEF");
* cipher.set_key(key)
* // set IV for browser
* const encoder_IV = new TextEncoder();
* const IV = encoder_IV.encode("0123456789ABCDEF");
* cipher.set_iv(IV)
* // set IV for node
* const IV = Buffer.from("0123456789ABCDEF");
* cipher.set_iv(IV)
* // Encrypt for browser
* const encoder_text = new TextEncoder();
* const text = encoder_text.encode("test text");
* const text_length = text.length
* const ciphertext = cipher.encrypt(text)
* // Encrypt for node
* const text = Buffer.from("test text");
* const text_length = text.length
* const ciphertext = cipher.encrypt(text)
* // Decrypt for browser
* cipher.set_key(key)
* cipher.set_iv(IV)
* const ciphertext = new Uint8Array(data.length)
* ciphertext.set(data)
* const decrypt_text = cipher.decrypt(ciphertext)
* const decoded_text = new TextDecoder();
* const string_data = decoded_text.decode(decrypt_text.subarray(0,text_length));
* // Decrypt for Node
* cipher.set_key(key)
* cipher.set_iv(IV)
* const ciphertext = Buffer.from(data);
* const decrypt_text = cipher.decrypt(ciphertext)
* const final_text = ciphertext.subarray(0,message_len)
* const string_data = final_text.toString()
* ```
*/
class SERPENT {
constructor() {
this.key_set = false;
this.iv_set = false;
}
SBOX0(a, b, c, d, usevalue) {
if (!usevalue) {
this.r0 = readUInt32LE(this.buffer, a);
this.r1 = readUInt32LE(this.buffer, b);
this.r2 = readUInt32LE(this.buffer, c);
this.r3 = readUInt32LE(this.buffer, d);
}
this.r4 = 0;
this.r3 ^= this.r0 >>> 0;
this.r4 = this.r1 >>> 0;
this.r1 &= this.r3 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r4 = this.r4 >>> 0;
this.r1 ^= this.r0 >>> 0;
this.r0 |= this.r3 >>> 0;
this.r0 ^= this.r4 >>> 0;
this.r4 ^= this.r3 >>> 0;
this.r3 ^= this.r2 >>> 0;
this.r2 |= this.r1 >>> 0;
this.r2 ^= this.r4 >>> 0;
this.r4 = ~this.r4 >>> 0;
this.r4 |= this.r1 >>> 0;
this.r1 ^= this.r3 >>> 0;
this.r1 ^= this.r4 >>> 0;
this.r3 |= this.r0 >>> 0;
this.r1 ^= this.r3 >>> 0;
this.r4 ^= this.r3 >>> 0;
this.r3 = this.r0 >>> 0;
this.r0 = this.r1 >>> 0;
this.r1 = this.r4 >>> 0;
if (!usevalue) {
writeUInt32LE(this.buffer, this.r0 >>> 0, a);
writeUInt32LE(this.buffer, this.r1 >>> 0, b);
writeUInt32LE(this.buffer, this.r2 >>> 0, c);
writeUInt32LE(this.buffer, this.r3 >>> 0, d);
}
}
;
SBOX1(a, b, c, d, usevalue) {
if (!usevalue) {
this.r0 = readUInt32LE(this.buffer, a);
this.r1 = readUInt32LE(this.buffer, b);
this.r2 = readUInt32LE(this.buffer, c);
this.r3 = readUInt32LE(this.buffer, d);
}
this.r4 = 0;
this.r0 = ~this.r0 >>> 0;
this.r2 = ~this.r2 >>> 0;
this.r4 = this.r0 >>> 0;
this.r0 &= this.r1 >>> 0;
this.r2 ^= this.r0 >>> 0;
this.r0 |= this.r3 >>> 0;
this.r3 ^= this.r2 >>> 0;
this.r1 ^= this.r0 >>> 0;
this.r0 ^= this.r4 >>> 0;
this.r4 |= this.r1 >>> 0;
this.r1 ^= this.r3 >>> 0;
this.r2 |= this.r0 >>> 0;
this.r2 &= this.r4 >>> 0;
this.r0 ^= this.r1 >>> 0;
this.r1 &= this.r2 >>> 0;
this.r1 ^= this.r0 >>> 0;
this.r0 &= this.r2 >>> 0;
this.r0 ^= this.r4 >>> 0;
this.r4 = this.r0 >>> 0;
this.r0 = this.r2 >>> 0;
this.r2 = this.r3 >>> 0;
this.r3 = this.r1 >>> 0;
this.r1 = this.r4 >>> 0;
if (!usevalue) {
writeUInt32LE(this.buffer, this.r0 >>> 0, a);
writeUInt32LE(this.buffer, this.r1 >>> 0, b);
writeUInt32LE(this.buffer, this.r2 >>> 0, c);
writeUInt32LE(this.buffer, this.r3 >>> 0, d);
}
}
;
SBOX2(a, b, c, d, usevalue) {
if (!usevalue) {
this.r0 = readUInt32LE(this.buffer, a);
this.r1 = readUInt32LE(this.buffer, b);
this.r2 = readUInt32LE(this.buffer, c);
this.r3 = readUInt32LE(this.buffer, d);
}
this.r4 = 0;
this.r4 = this.r0 >>> 0;
this.r0 &= this.r2 >>> 0;
this.r0 ^= this.r3 >>> 0;
this.r2 ^= this.r1 >>> 0;
this.r2 ^= this.r0 >>> 0;
this.r3 |= this.r4 >>> 0;
this.r3 ^= this.r1 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r1 = this.r3 >>> 0;
this.r3 |= this.r4 >>> 0;
this.r3 ^= this.r0 >>> 0;
this.r0 &= this.r1 >>> 0;
this.r4 ^= this.r0 >>> 0;
this.r1 ^= this.r3 >>> 0;
this.r1 ^= this.r4 >>> 0;
this.r4 = ~this.r4 >>> 0;
this.r0 = this.r2 >>> 0;
this.r2 = this.r1 >>> 0;
this.r1 = this.r3 >>> 0;
this.r3 = this.r4 >>> 0;
if (!usevalue) {
writeUInt32LE(this.buffer, this.r0 >>> 0, a);
writeUInt32LE(this.buffer, this.r1 >>> 0, b);
writeUInt32LE(this.buffer, this.r2 >>> 0, c);
writeUInt32LE(this.buffer, this.r3 >>> 0, d);
}
}
;
SBOX3(a, b, c, d, usevalue) {
if (!usevalue) {
this.r0 = readUInt32LE(this.buffer, a);
this.r1 = readUInt32LE(this.buffer, b);
this.r2 = readUInt32LE(this.buffer, c);
this.r3 = readUInt32LE(this.buffer, d);
}
this.r4 = 0;
this.r4 = this.r0 >>> 0;
this.r0 |= this.r3 >>> 0;
this.r3 ^= this.r1 >>> 0;
this.r1 &= this.r4 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r2 ^= this.r3 >>> 0;
this.r3 &= this.r0 >>> 0;
this.r4 |= this.r1 >>> 0;
this.r3 ^= this.r4 >>> 0;
this.r0 ^= this.r1 >>> 0;
this.r4 &= this.r0 >>> 0;
this.r1 ^= this.r3 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r1 |= this.r0 >>> 0;
this.r1 ^= this.r2 >>> 0;
this.r0 ^= this.r3 >>> 0;
this.r2 = this.r1 >>> 0;
this.r1 |= this.r3 >>> 0;
this.r1 ^= this.r0 >>> 0;
this.r0 = this.r1 >>> 0;
this.r1 = this.r2 >>> 0;
this.r2 = this.r3 >>> 0;
this.r3 = this.r4 >>> 0;
if (!usevalue) {
writeUInt32LE(this.buffer, this.r0 >>> 0, a);
writeUInt32LE(this.buffer, this.r1 >>> 0, b);
writeUInt32LE(this.buffer, this.r2 >>> 0, c);
writeUInt32LE(this.buffer, this.r3 >>> 0, d);
}
}
;
SBOX4(a, b, c, d, usevalue) {
if (!usevalue) {
this.r0 = readUInt32LE(this.buffer, a);
this.r1 = readUInt32LE(this.buffer, b);
this.r2 = readUInt32LE(this.buffer, c);
this.r3 = readUInt32LE(this.buffer, d);
}
this.r4 = 0;
this.r1 ^= this.r3 >>> 0;
this.r3 = ~this.r3 >>> 0;
this.r2 ^= this.r3 >>> 0;
this.r3 ^= this.r0 >>> 0;
this.r4 = this.r1 >>> 0;
this.r1 &= this.r3 >>> 0;
this.r1 ^= this.r2 >>> 0;
this.r4 ^= this.r3 >>> 0;
this.r0 ^= this.r4 >>> 0;
this.r2 &= this.r4 >>> 0;
this.r2 ^= this.r0 >>> 0;
this.r0 &= this.r1 >>> 0;
this.r3 ^= this.r0 >>> 0;
this.r4 |= this.r1 >>> 0;
this.r4 ^= this.r0 >>> 0;
this.r0 |= this.r3 >>> 0;
this.r0 ^= this.r2 >>> 0;
this.r2 &= this.r3 >>> 0;
this.r0 = ~this.r0 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r2 = this.r0 >>> 0;
this.r0 = this.r1 >>> 0;
this.r1 = this.r4 >>> 0;
if (!usevalue) {
writeUInt32LE(this.buffer, this.r0 >>> 0, a);
writeUInt32LE(this.buffer, this.r1 >>> 0, b);
writeUInt32LE(this.buffer, this.r2 >>> 0, c);
writeUInt32LE(this.buffer, this.r3 >>> 0, d);
}
}
;
SBOX5(a, b, c, d, usevalue) {
if (!usevalue) {
this.r0 = readUInt32LE(this.buffer, a);
this.r1 = readUInt32LE(this.buffer, b);
this.r2 = readUInt32LE(this.buffer, c);
this.r3 = readUInt32LE(this.buffer, d);
}
this.r4 = 0;
this.r0 ^= this.r1 >>> 0;
this.r1 ^= this.r3 >>> 0;
this.r3 = ~this.r3 >>> 0;
this.r4 = this.r1 >>> 0;
this.r1 &= this.r0 >>> 0;
this.r2 ^= this.r3 >>> 0;
this.r1 ^= this.r2 >>> 0;
this.r2 |= this.r4 >>> 0;
this.r4 ^= this.r3 >>> 0;
this.r3 &= this.r1 >>> 0;
this.r3 ^= this.r0 >>> 0;
this.r4 ^= this.r1 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r2 ^= this.r0 >>> 0;
this.r0 &= this.r3 >>> 0;
this.r2 = ~this.r2 >>> 0;
this.r0 ^= this.r4 >>> 0;
this.r4 |= this.r3 >>> 0;
this.r2 ^= this.r4 >>> 0;
this.r4 = this.r0 >>> 0;
this.r0 = this.r1 >>> 0;
this.r1 = this.r3 >>> 0;
this.r3 = this.r2 >>> 0;
this.r2 = this.r4 >>> 0;
if (!usevalue) {
writeUInt32LE(this.buffer, this.r0 >>> 0, a);
writeUInt32LE(this.buffer, this.r1 >>> 0, b);
writeUInt32LE(this.buffer, this.r2 >>> 0, c);
writeUInt32LE(this.buffer, this.r3 >>> 0, d);
}
}
;
SBOX6(a, b, c, d, usevalue) {
if (!usevalue) {
this.r0 = readUInt32LE(this.buffer, a);
this.r1 = readUInt32LE(this.buffer, b);
this.r2 = readUInt32LE(this.buffer, c);
this.r3 = readUInt32LE(this.buffer, d);
}
this.r4 = 0;
this.r2 = ~this.r2 >>> 0;
this.r4 = this.r3 >>> 0;
this.r3 &= this.r0 >>> 0;
this.r0 ^= this.r4 >>> 0;
this.r3 ^= this.r2 >>> 0;
this.r2 |= this.r4 >>> 0;
this.r1 ^= this.r3 >>> 0;
this.r2 ^= this.r0 >>> 0;
this.r0 |= this.r1 >>> 0;
this.r2 ^= this.r1 >>> 0;
this.r4 ^= this.r0 >>> 0;
this.r0 |= this.r3 >>> 0;
this.r0 ^= this.r2 >>> 0;
this.r4 ^= this.r3 >>> 0;
this.r4 ^= this.r0 >>> 0;
this.r3 = ~this.r3 >>> 0;
this.r2 &= this.r4 >>> 0;
this.r2 ^= this.r3 >>> 0;
this.r3 = this.r2 >>> 0;
this.r2 = this.r4 >>> 0;
if (!usevalue) {
writeUInt32LE(this.buffer, this.r0 >>> 0, a);
writeUInt32LE(this.buffer, this.r1 >>> 0, b);
writeUInt32LE(this.buffer, this.r2 >>> 0, c);
writeUInt32LE(this.buffer, this.r3 >>> 0, d);
}
}
;
SBOX7(a, b, c, d, usevalue) {
if (!usevalue) {
this.r0 = readUInt32LE(this.buffer, a);
this.r1 = readUInt32LE(this.buffer, b);
this.r2 = readUInt32LE(this.buffer, c);
this.r3 = readUInt32LE(this.buffer, d);
}
this.r4 = 0;
this.r4 = this.r1 >>> 0;
this.r1 |= this.r2 >>> 0;
this.r1 ^= this.r3 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r2 ^= this.r1 >>> 0;
this.r3 |= this.r4 >>> 0;
this.r3 &= this.r0 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r3 ^= this.r1 >>> 0;
this.r1 |= this.r4 >>> 0;
this.r1 ^= this.r0 >>> 0;
this.r0 |= this.r4 >>> 0;
this.r0 ^= this.r2 >>> 0;
this.r1 ^= this.r4 >>> 0;
this.r2 ^= this.r1 >>> 0;
this.r1 &= this.r0 >>> 0;
this.r1 ^= this.r4 >>> 0;
this.r2 = ~this.r2 >>> 0;
this.r2 |= this.r0 >>> 0;
this.r4 ^= this.r2 >>> 0;
this.r2 = this.r1 >>> 0;
this.r1 = this.r3 >>> 0;
this.r3 = this.r0 >>> 0;
this.r0 = this.r4 >>> 0;
if (!usevalue) {
writeUInt32LE(this.buffer, this.r0 >>> 0, a);
writeUInt32LE(this.buffer, this.r1 >>> 0, b);
writeUInt32LE(this.buffer, this.r2 >>> 0, c);
writeUInt32LE(this.buffer, this.r3 >>> 0, d);
}
}
;
/**
* Key for encryption.
*
* Only lengths of 16, 24 or 32 bytes allowed!
*
* @param {Buffer|Uint8Array} key - ```Buffer``` or ```Uint8Array```
*/
set_key(key) {
if (!isBufferOrUint8Array(key)) {
throw Error("key must be Buffer or Uint8Array");
}
var keyLen = key.length;
switch (keyLen) {
case 16:
break;
case 24:
break;
case 32:
break;
default:
throw Error("Only key lengths of 16, 24 or 32 bytes allowed!");
}
keyLen = keyLen / 4;
this.buffer = new Uint8Array(560);
let i = 0;
for (i; i < keyLen; i++) {
const element = readUInt32LE(key, i * 4);
writeUInt32LE(this.buffer, element, i * 4);
}
if (i < 8) {
writeUInt32LE(this.buffer, 0x00000001, i * 4);
i++;
}
while (i < 8) {
writeUInt32LE(this.buffer, 0x0, i * 4);
i++;
}
var key_loc = 0;
var writer_pointer = 32;
let k;
for (k = 0; k != 132; ++k) {
var int_1 = readUInt32LE(this.buffer, key_loc + (k * 4));
var int_2 = readUInt32LE(this.buffer, key_loc + 12 + (k * 4));
var int_3 = readUInt32LE(this.buffer, key_loc + 20 + (k * 4));
var int_4 = readUInt32LE(this.buffer, key_loc + 28 + (k * 4));
var value = rotl(k ^ int_1 ^ int_2 ^ int_3 ^ int_4 ^ 0x9E3779B9, 11);
writeUInt32LE(this.buffer, value, writer_pointer + (k * 4));
}
for (i = 0; i < 128; i += 32) {
this.SBOX3((i * 4) + (0 * 4) + 32, (i * 4) + (1 * 4) + 32, (i * 4) + (2 * 4) + 32, (i * 4) + (3 * 4) + 32);
this.SBOX2((i * 4) + (4 * 4) + 32, (i * 4) + (5 * 4) + 32, (i * 4) + (6 * 4) + 32, (i * 4) + (7 * 4) + 32);
this.SBOX1((i * 4) + (8 * 4) + 32, (i * 4) + (9 * 4) + 32, (i * 4) + (10 * 4) + 32, (i * 4) + (11 * 4) + 32);
this.SBOX0((i * 4) + (12 * 4) + 32, (i * 4) + (13 * 4) + 32, (i * 4) + (14 * 4) + 32, (i * 4) + (15 * 4) + 32);
this.SBOX7((i * 4) + (16 * 4) + 32, (i * 4) + (17 * 4) + 32, (i * 4) + (18 * 4) + 32, (i * 4) + (19 * 4) + 32);
this.SBOX6((i * 4) + (20 * 4) + 32, (i * 4) + (21 * 4) + 32, (i * 4) + (22 * 4) + 32, (i * 4) + (23 * 4) + 32);
this.SBOX5((i * 4) + (24 * 4) + 32, (i * 4) + (25 * 4) + 32, (i * 4) + (26 * 4) + 32, (i * 4) + (27 * 4) + 32);
this.SBOX4((i * 4) + (28 * 4) + 32, (i * 4) + (29 * 4) + 32, (i * 4) + (30 * 4) + 32, (i * 4) + (31 * 4) + 32);
}
this.SBOX3(544, 548, 552, 556);
this.key_set = true;
}
;
/**
* IV for CBC encryption.
*
* Must be 16 bytes!
*
* @param {Buffer|Uint8Array} iv - ```Buffer``` or ```Uint8Array```
*/
set_iv(iv) {
if (iv) {
if (!isBufferOrUint8Array(iv)) {
throw Error("IV must be a buffer or UInt8Array");
}
else {
if (iv.length != 16) {
throw Error("Enter a vaild 16 byte IV for CBC mode");
}
else {
this.iv = iv;
this.iv_set = true;
}
}
}
else {
throw Error("Enter a vaild 16 byte IV for CBC mode");
}
}
;
encrypt_block(block) {
let start_chunk = block;
if (this.iv_set == true) {
start_chunk = xor(block, this.iv);
}
let t3 = 0;
let t6 = 0;
let t4 = 0;
let v11 = 0;
let v12 = 0;
let x22 = 0;
let v14 = 0;
let x0 = 0;
let x2 = 0;
let x3 = 0;
let x1 = 0;
let x01 = 0;
let x21 = 0;
let v21 = 0;
let v22 = 0;
let v23 = 0;
let v24 = 0;
let v25 = 0;
let v26 = 0;
let v27 = 0;
let v28 = 0;
let v29 = 0;
let v30 = 0;
let v31 = 0;
let v32 = 0;
let v33 = 0;
let v34 = 0;
let v35 = 0;
let v36 = 0;
let v37 = 0;
let v38 = 0;
let v39 = 0;
let v40 = 0;
let v41 = 0;
let v42 = 0;
let v43 = 0;
let v44 = 0;
let v45 = 0;
let v46 = 0;
let v47 = 0;
let v48 = 0;
let v49 = 0;
let v50 = 0;
let v51 = 0;
let v52 = 0;
let v53 = 0;
let v54 = 0;
let v55 = 0;
let v56 = 0;
let v57 = 0;
let v58 = 0;
let v59 = 0;
let v60 = 0;
let v61 = 0;
let v62 = 0;
let v63 = 0;
let v64 = 0;
let v65 = 0;
let v66 = 0;
let v67 = 0;
let v68 = 0;
let v69 = 0;
let v70 = 0;
let v71 = 0;
let v72 = 0;
let v73 = 0;
let v74 = 0;
let v75 = 0;
let v76 = 0;
let v77 = 0;
let v78 = 0;
let v79 = 0;
let v80 = 0;
let v81 = 0;
let v82 = 0;
let v83 = 0;
let v84 = 0;
let v85 = 0;
let v86 = 0;
let v87 = 0;
let v88 = 0;
let v89 = 0;
let v90 = 0;
let v91 = 0;
let v92 = 0;
let v93 = 0;
let v94 = 0;
let v95 = 0;
let v96 = 0;
let v97 = 0;
let v98 = 0;
let v99 = 0;
let v100 = 0;
let v101 = 0;
let v102 = 0;
let v103 = 0;
let v104 = 0;
let v105 = 0;
let v106 = 0;
let v107 = 0;
let v108 = 0;
let v109 = 0;
let v110 = 0;
let v111 = 0;
let v112 = 0;
let v113 = 0;
let v114 = 0;
let v115 = 0;
let v116 = 0;
let v117 = 0;
let v118 = 0;
let v119 = 0;
let v120 = 0;
let v121 = 0;
let v122 = 0;
let v123 = 0;
let v124 = 0;
let v125 = 0;
let v126 = 0;
let v127 = 0;
let v128 = 0;
let v129 = 0;
let v130 = 0;
let v131 = 0;
let v132 = 0;
let v133 = 0;
let v134 = 0;
let v135 = 0;
let v136 = 0;
let v137 = 0;
let v138 = 0;
let v139 = 0;
let v140 = 0;
let v141 = 0;
let v142 = 0;
let v143 = 0;
let v144 = 0;
let v145 = 0;
let v146 = 0;
let v147 = 0;
let v148 = 0;
let v149 = 0;
let v150 = 0;
let v151 = 0;
let v152 = 0;
let v153 = 0;
let v154 = 0;
let v155 = 0;
let v156 = 0;
let v157 = 0;
let v158 = 0;
let v159 = 0;
let v160 = 0;
let v161 = 0;
let v162 = 0;
let v163 = 0;
let v164 = 0;
let v165 = 0;
let v166 = 0;
let v167 = 0;
let v168 = 0;
let v169 = 0;
let v170 = 0;
let v171 = 0;
let v172 = 0;
let v173 = 0;
let v174 = 0;
let v175 = 0;
let v176 = 0;
let v177 = 0;
let v178 = 0;
let v179 = 0;
let v180 = 0;
let v181 = 0;
let v182 = 0;
let v183 = 0;
let v184 = 0;
let v185 = 0;
let v186 = 0;
let v187 = 0;
let v188 = 0;
let v189 = 0;
let v190 = 0;
let v191 = 0;
let v192 = 0;
let v193 = 0;
let v194 = 0;
let v195 = 0;
let v196 = 0;
let v197 = 0;
let v198 = 0;
let v199 = 0;
let v200 = 0;
let v201 = 0;
let v202 = 0;
let v203 = 0;
let v204 = 0;
let v205 = 0;
let v206 = 0;
let v207 = 0;
let v208 = 0;
let v209 = 0;
let v210 = 0;
let v211 = 0;
let v212 = 0;
let v213 = 0;
let v214 = 0;
let v215 = 0;
let v216 = 0;
let v217 = 0;
let v218 = 0;
let v219 = 0;
let v220 = 0;
let v221 = 0;
let v222 = 0;
let v223 = 0;
let v224 = 0;
let v225 = 0;
let v226 = 0;
let v227 = 0;
let v228 = 0;
let v229 = 0;
let v230 = 0;
let v231 = 0;
let v232 = 0;
let v233 = 0;
let v234 = 0;
let v235 = 0;
let v236 = 0;
let v237 = 0;
let v238 = 0;
let v239 = 0;
let v240 = 0;
let v241 = 0;
let v242 = 0;
let v243 = 0;
let v244 = 0;
let v245 = 0;
let v246 = 0;
let v247 = 0;
let v248 = 0;
let v249 = 0;
let v250 = 0;
let v251 = 0;
let v252 = 0;
let v253 = 0;
let v254 = 0;
let v255 = 0;
let v256 = 0;
let v257 = 0;
let v258 = 0;
let v259 = 0;
let v260 = 0;
let v261 = 0;
let v262 = 0;
let v263 = 0;
let v264 = 0;
let v265 = 0;
let v266 = 0;
let v267 = 0;
let v268 = 0;
let v269 = 0;
let v270 = 0;
let v271 = 0;
let v272 = 0;
let v273 = 0;
let v274 = 0;
let v275 = 0;
let v276 = 0;
let v277 = 0;
let v278 = 0;
let v279 = 0;
let v280 = 0;
let v281 = 0;
let v282 = 0;
let v283 = 0;
let v284 = 0;
let v285 = 0;
let v286 = 0;
let v287 = 0;
let v288 = 0;
let v289 = 0;
let v290 = 0;
let v291 = 0;
let v292 = 0;
let v293 = 0;
let v294 = 0;
let v295 = 0;
let v296 = 0;
let v297 = 0;
let v298 = 0;
let v299 = 0;
let v300 = 0;
let v301 = 0;
let v302 = 0;
let v303 = 0;
let v304 = 0;
let v305 = 0;
let v306 = 0;
let v307 = 0;
let v308 = 0;
let v309 = 0;
let v310 = 0;
let v311 = 0;
let v312 = 0;
let v313 = 0;
let v314 = 0;
let v315 = 0;
let v316 = 0;
let v317 = 0;
let v318 = 0;
let v319 = 0;
let v320 = 0;
let v321 = 0;
let v322 = 0;
let v323 = 0;
let v324 = 0;
let v325 = 0;
let v326 = 0;
let v327 = 0;
let v328 = 0;
let v329 = 0;
let v330 = 0;
let v331 = 0;
let v332 = 0;
let v333 = 0;
let v334 = 0;
let v335 = 0;
let v336 = 0;
let v337 = 0;
let v338 = 0;
let v339 = 0;
let v340 = 0;
let v341 = 0;
let v342 = 0;
let v343 = 0;
let v344 = 0;
let v345 = 0;
let v346 = 0;
let v347 = 0;
let v348 = 0;
let v349 = 0;
let v350 = 0;
let v351 = 0;
let v352 = 0;
let v353 = 0;
let v354 = 0;
let v355 = 0;
let v356 = 0;
let v357 = 0;
let v358 = 0;
let v359 = 0;
let v360 = 0;
let v361 = 0;
let v362 = 0;
let v363 = 0;
let v364 = 0;
let v365 = 0;
let v366 = 0;
let v367 = 0;
let v368 = 0;
let v369 = 0;
let v370 = 0;
let v371 = 0;
let v372 = 0;
let v373 = 0;
let v374 = 0;
let v375 = 0;
let v376 = 0;
let v377 = 0;
let v378 = 0;
let v379 = 0;
let v380 = 0;
let v381 = 0;
let v382 = 0;
let v383 = 0;
let v384 = 0;
let v385 = 0;
let v386 = 0;
let v387 = 0;
let v388 = 0;
let v389 = 0;
let v390 = 0;
let v391 = 0;
let v392 = 0;
let v393 = 0;
let v394 = 0;
let v395 = 0;
let v396 = 0;
let v397 = 0;
let v398 = 0;
let v399 = 0;
let v400 = 0;
let v401 = 0;
let v402 = 0;
let v403 = 0;
let v404 = 0;
let v405 = 0;
let v406 = 0;
let v407 = 0;
let v408 = 0;
let v409 = 0;
let v410 = 0;
let v411 = 0;
let v412 = 0;
let v413 = 0;
let v414 = 0;
let v415 = 0;
let v416 = 0;
let v417 = 0;
let v418 = 0;
let v419 = 0;
let v420 = 0;
let v421 = 0;
let v422 = 0;
let v423 = 0;
let v424 = 0;
let v425 = 0;
let v426 = 0;
let v427 = 0;
let v428 = 0;
let v429 = 0;
let v430 = 0;
let v431 = 0;
let v432 = 0;
let v433 = 0;
let v434 = 0;
let v435 = 0;
let v436 = 0;
let v437 = 0;
let v438 = 0;
let v439 = 0;
let v440 = 0;
let v441 = 0;
let v442 = 0;
let v443 = 0;
let v444 = 0;
let v445 = 0;
let v446 = 0;
let v447 = 0;
let v448 = 0;
let v449 = 0;
let v450 = 0;
let v451 = 0;
let v452 = 0;
let v453 = 0;
let v454 = 0;
let v455 = 0;
let v456 = 0;
let v457 = 0;
let v458 = 0;
let v459 = 0;
let v460 = 0;
let v461 = 0;
let v462 = 0;
let v463 = 0;
let v464 = 0;
let v465 = 0;
let v466 = 0;
let v467 = 0;
let v468 = 0;
let v469 = 0;
let v470 = 0;
let v471 = 0;
let v472 = 0;
let v473 = 0;
let v474 = 0;
let v475 = 0;
let v476 = 0;
let v477 = 0;
let v478 = 0;
let v479 = 0;
let v480 = 0;
let v481 = 0;
let v482 = 0;
let v483 = 0;
let v484 = 0;
let v485 = 0;
let v486 = 0;
let v487 = 0;
let v488 = 0;
let v489 = 0;
let v490 = 0;
let v491 = 0;
let v492 = 0;
let v493 = 0;
let v494 = 0;
let v495 = 0;
let v496 = 0;
let v497 = 0;
let v498 = 0;
let v499 = 0;
let v500 = 0;
let v501 = 0;
let v502 = 0;
let v503 = 0;
let v504 = 0;
let v505 = 0;
let v506 = 0;
let v507 = 0;
let v508 = 0;
let v509 = 0;
let v510 = 0;
let v511 = 0;
let v512 = 0;
let v513 = 0;
let v514 = 0;
let v515 = 0;
let v516 = 0;
let v517 = 0;
let v518 = 0;
let v519 = 0;
let v520 = 0;
let v521 = 0;
let v522 = 0;
let v523 = 0;
let v524 = 0;
let v525 = 0;
let v526 = 0;
let v527 = 0;
let v528 = 0;
let v529 = 0;
let v530 = 0;
let v531 = 0;
let v532 = 0;
let v533 = 0;
let v534 = 0;
let v535 = 0;
let v536 = 0;
let v537 = 0;
let v538 = 0;
let v539 = 0;
let v540 = 0;
let v541 = 0;
let v542 = 0;
let v543 = 0;
let v544 = 0;
let v545 = 0;
let v546 = 0;
let v547 = 0;
let v548 = 0;
let v549 = 0;
let v550 = 0;
let v551 = 0;
let v552 = 0;
let v553 = 0;
let resu = 0;
let v555 = 0;
let v556 = 0;
let v557 = 0;
let v558 = 0;
let v559 = 0;
let v560 = 0;
let v561 = 0;
let v562 = 0;
let v563 = 0;
let v564 = 0;
let v565 = 0;
let v566 = 0;
let v567 = 0;
let v568 = 0;
let a = readUInt32LE(start_chunk, 0) ^ readUInt32LE(this.buffer, 32);
let b = readUInt32LE(start_chunk, 4) ^ readUInt32LE(this.buffer, 36);
let c = readUInt32LE(start_chunk, 8) ^ readUInt32LE(this.buffer, 40);
let d = readUInt32LE(start_chunk, 12) ^ readUInt32LE(this.buffer, 44);
t3 = d ^ a ^ c;
t6 = (d ^ a) & b;
t4 = t3 ^ b;
v11 = t4 ^ d & a;
v12 = t6 ^ a;
x22 = (v12 | c) ^ t4;
v14 = v11 & (v12 ^ t3);
x0 = rotl(v14 ^ ~v12, 13);
x2 = rotl(x22, 3);
x3 = rotl(x2 ^ (8 * x0) ^ v11, 7);
x1 = rotl(v14 ^ ~(x2 ^ x0 ^ t3), 1);
x01 = rotl(x3 ^ x0 ^ x1, 5);
x21 = rotl(x3 ^ x2 ^ (x1 << 7), 22);
v21 = readUInt32LE(this.buffer, (38 * 4) - 104) ^ x01;
v22 = readUInt32LE(this.buffer, (39 * 4) - 104) ^ x1;
v23 = v22 ^ v21;
v24 = readUInt32LE(this.buffer, (41 * 4) - 104) ^ x3;
v25 = v24 | ~(v22 ^ v21);
v26 = readUInt32LE(this.buffer, (40 * 4) - 104) ^ x21 ^ (v21 | ~(v22 ^ v21));
v27 = v26 ^ v24;
v28 = v25 ^ v22;
v29 = v23 ^ ~(v26 ^ v24);
v30 = v29 ^ v28 & v26;
v31 = v28 ^ v26;
v32 = rotl(v29 & (v28 ^ v26) ^ v26, 13);
v33 = rotl(v27, 3);
v34 = v30 ^ v33 ^ (8 * v32);
v35 = v30 ^ v33 ^ v32 ^ v31;
v36 = rotl(v34, 7);
v37 = rotl(v35, 1);
v38 = rotl(v36 ^ v32 ^ v37, 5);
v39 = rotl(v36 ^ v33 ^ (v37 << 7), 22);
v40 = readUInt32LE(this.buffer, (42 * 4) - 104) ^ v38;
v41 = readUInt32LE(this.buffer, (43 * 4) - 104) ^ v37;
v42 = readUInt32LE(this.buffer, (45 * 4) - 104);
v43 = readUInt32LE(this.buffer, (44 * 4) - 104) ^ v39;
v44 = v42 ^ v36 ^ v41 ^ v43 & ~v40;
v45 = v40 ^ ~v43;
v46 = (v44 ^ v43) & v41;
v47 = v46 ^ v45;
v48 = (v46 | v42 ^ v36) & (v44 | v45) ^ v40;
v49 = (v42 ^ ~v36) & ~v40;
v50 = rotl(v44, 13);
v51 = rotl(v48, 3);
v52 = v47 ^ v51 ^ v41 ^ v50 ^ v49 ^ v48;
v53 = rotl(v47 ^ v51 ^ (8 * v50), 7);
v54 = rotl(v52, 1);
v55 = v53 ^ v50 ^ v54;
v56 = v53 ^ v51 ^ (v54 << 7);
v57 = rotl(v55, 5);
v58 = rotl(v56, 22);
v59 = readUInt32LE(this.buffer, (46 * 4) - 104) ^ v57;
v60 = readUInt32LE(this.buffer, (47 * 4) - 104) ^ v54;
v61 = readUInt32LE(this.buffer, (48 * 4) - 104) ^ v58;
v62 = readUInt32LE(this.buffer, (49 * 4) - 104) ^ v53;
v63 = v61 ^ v59 ^ v62;
v64 = v63 & v59 ^ v62;
v65 = v64 & v60 ^ v63;
v66 = v62 | v60;
v67 = (v65 | v59) & v64;
v68 = (v62 | v59) ^ v60;
v69 = rotl((v63 & v59 ^ (v62 | v60)) & v61 ^ v68, 13);
v70 = rotl(v65, 3);
v71 = v67 ^ v70 ^ (8 * v69) ^ v68 ^ v65;
v72 = v67 ^ v70 ^ v69 ^ v66;
v73 = rotl(v71, 7);
v74 = rotl(v72, 1);
v75 = v73 ^ v69 ^ v74;
v76 = v73 ^ v70 ^ (v74 << 7);
v77 = rotl(v75, 5);
v78 = rotl(v76, 22);
v79 = readUInt32LE(this.buffer, (50 * 4) - 104) ^ v77;
v80 = readUInt32LE(this.buffer, (51 * 4) - 104) ^ v74;
v81 = readUInt32LE(this.buffer, (53 * 4) - 104) ^ v73;
v82 = v81 ^ v79;
v83 = readUInt32LE(this.buffer, (52 * 4) - 104) ^ v78 ^ (v81 ^ v79) & v81;
v84 = v83 | v80;
v85 = v83 ^ (v81 ^ v79 | ~v80);
v86 = v80 ^ ~(v81 ^ v79);
v87 = v85 & v79 ^ v84 & v86;
v88 = v87 & v86;
v89 = rotl(v85, 13);
v90 = rotl(v87, 3);
v91 = rotl(v90 ^ (8 * v89) ^ v82 ^ v84, 7);
v92 = rotl(v89 ^ v79 ^ v90 ^ v83 ^ v88, 1);
v93 = rotl(v91 ^ v89 ^ v92, 5);
v94 = rotl(v91 ^ v90 ^ (v92 << 7), 22);
v95 = readUInt32LE(this.buffer, (54 * 4) - 104) ^ v93;
v96 = readUInt32LE(this.buffer, (55 * 4) - 104) ^ v92;
v97 = readUInt32LE(this.buffer, (57 * 4) - 104) ^ v91;
v98 = v95 ^ ~v94 ^ readUInt32LE(this.buffer, (56 * 4) - 104) ^ (v97 ^ v95 | v96 ^ v95);
v99 = v98 & v97;
v100 = v98 ^ v96 ^ v95 ^ v98 & v97;
v101 = v98 & v97 | v96 ^ v95;
v102 = (v98 | ~v95) ^ v97 ^ v95;
v103 = v101 ^ v102;
v104 = v100 & v102;
v105 = rotl(v98, 13);
v106 = rotl(v103, 3);
v107 = rotl(v106 ^ v96 ^ (8 * v105) ^ v99 ^ v104, 7);
v108 = rotl(v106 ^ v105 ^ v100, 1);
v109 = rotl(v107 ^ v105 ^ v108, 5);
v110 = rotl(v107 ^ v106 ^ (v108 << 7), 22);
v111 = readUInt32LE(this.buffer, (58 * 4) - 104) ^ v109;
v112 = readUInt32LE(this.buffer, (59 * 4) - 104) ^ v108;
v113 = readUInt32LE(this.buffer, (61 * 4) - 104) ^ v107;
v114 = v113 ^ v111 ^ v112;
v115 = readUInt32LE(this.buffer, (60 * 4) - 104) ^ v110 ^ (v113 ^ v111 | ~v111);
v116 = v115 ^ v112;
v117 = (v115 ^ v112 | v113 ^ v111) ^ v113;
v118 = v117 & v115 ^ v114;
v119 = v117 ^ v115;
v120 = v119 & v114;
v121 = rotl(v118 ^ v119, 13);
v122 = rotl(v118, 3);
v123 = v122 ^ (8 * v121) ^ v115 ^ ~v120;
v124 = v122 ^ v121 ^ v116;
v125 = rotl(v123, 7);
v126 = rotl(v124, 1);
v127 = rotl(v125 ^ v121 ^ v126, 5);
v128 = rotl(v125 ^ v122 ^ (v126 << 7), 22);
v129 = readUInt32LE(this.buffer, (62 * 4) - 104) ^ v127;
v130 = readUInt32LE(this.buffer, (63 * 4) - 104) ^ v126;
v131 = readUInt32LE(this.buffer, (64 * 4) - 104) ^ v128;
v132 = readUInt32LE(this.buffer, (65 * 4) - 104) ^ v125;
v133 = v130 | ~v131;
v134 = (v133 ^ v132) & v129;
v135 = v134 ^ v131 ^ v130;
v136 = v132 ^ v129 ^ (v134 ^ v130 | v131 ^ v130);
v137 = (v136 ^ v134) & v135 ^ v133 & v132;
v138 = rotl(v136 ^ v134 ^ (v133 ^ v132 | ~v131) ^ v137, 13);
v139 = rotl(v137, 3);
v140 = v139 ^ (8 * v138) ^ v135;
v141 = v139 ^ v138 ^ v136;
v142 = rotl(v140, 7);
v143 = rotl(v141, 1);
v144 = rotl(v142 ^ v138 ^ v143, 5);
v145 = rotl(v142 ^ v139 ^ (v143 << 7), 22);
v146 = readUInt32LE(this.buffer, (66 * 4) - 104) ^ v144;
v147 = readUInt32LE(this.buffer, (67 * 4) - 104) ^ v143;
v148 = readUInt32LE(this.buffer, (68 * 4) - 104) ^ v145;
v149 = readUInt32LE(this.buffer, (69 * 4) - 104) ^ v142;
v150 = v149 ^ v146 ^ v148;
v151 = (v149 ^ v146) & v147;
v152 = v150 ^ v147;
v153 = v152 ^ v149 & v146;
v154 = v151 ^ v146;
v155 = (v154 | v148) ^ v152;
v156 = v153 & (v154 ^ v150);
v157 = rotl(v156 ^ ~v154, 13);
v158 = rotl(v155, 3);
v159 = rotl(v158 ^ (8 * v157) ^ v153, 7);
v160 = rotl(v156 ^ ~(v158 ^ v157 ^ v150), 1);
v161 = rotl(v159 ^ v157 ^ v160, 5);
v162 = rotl(v159 ^ v158 ^ (v160 << 7), 22);
v163 = readUInt32LE(this.buffer, (70 * 4) - 104) ^ v161;
v164 = readUInt32LE(this.buffer, (71 * 4) - 104) ^ v160;
v165 = v164 ^ v163;
v166 = readUInt32LE(this.buffer, (73 * 4) - 104) ^ v159;
v167 = v166 | ~(v164 ^ v163);
v168 = readUInt32LE(this.buffer, (72 * 4) - 104) ^ v162 ^ (v163 | ~(v164 ^ v163));
v169 = v168 ^ v166;
v170 = v167 ^ v164;
v171 = v165 ^ ~(v168 ^ v166);
v172 = v171 ^ v170 & v168;
v173 = v170 ^ v168;
v174 = rotl(v171 & (v170 ^ v168) ^ v168, 13);
v175 = rotl(v169, 3);
v176 = v172 ^ v175 ^ (8 * v174);
v177 = v172 ^ v175 ^ v174 ^ v173;
v178 = rotl(v176, 7);
v179 = rotl(v177, 1);
v180 = rotl(v178 ^ v174 ^ v179, 5);
v181 = rotl(v178 ^ v175 ^ (v179 << 7), 22);
v182 = readUInt32LE(this.buffer, (74 * 4) - 104) ^ v180;
v183 = readUInt32LE(this.buffer, (75 * 4) - 104) ^ v179;
v184 = readUInt32LE(this.buffer, (76 * 4) - 104) ^ v181;
v185 = readUInt32LE(this.buffer, (77 * 4) - 104);
v186 = v185 ^ v178 ^ v183 ^ v184 & ~v182;
v187 = v182 ^ ~v184;
v188 = (v186 ^ v184) & v183;
v189 = v188 ^ v187;
v190 = (v188 | v185 ^ v178) & (v186 | v187) ^ v182;
v191 = (v185 ^ ~v178) & ~v182;
v192 = rotl(v186, 13);
v193 = rotl(v190, 3);
v194 = v189 ^ v193 ^ v183 ^ v192 ^ v191 ^ v190;
v195 = rotl(v189 ^ v193 ^ (8 * v192), 7);
v196 = rotl(v194, 1);
v197 = v195 ^ v192 ^ v196;
v198 = v195 ^ v193 ^ (v196 << 7);
v199 = rotl(v197, 5);
v200 = rotl(v198, 22);
v201 = readUInt32LE(this.buffer, (78 * 4) - 104) ^ v199;
v202 = readUInt32LE(this.buffer, (79 * 4) - 104) ^ v196;
v203 = readUInt32LE(this.buffer, (80 * 4) - 104) ^ v200;
v204 = readUInt32LE(this.buffer, (81 * 4) - 104) ^ v195;
v205 = v203 ^ v201 ^ v204;
v206 = v205 & v201 ^ v204;
v207 = v206 & v202 ^ v205;
v208 = v204 | v202;
v209 = (v207 | v201) & v206;
v210 = (v204 | v201) ^ v202;
v211 = rotl((v205 & v201 ^ (v204 | v202)) & v203 ^ v210, 13);
v212 = rotl(v207, 3);
v213 = v209 ^ v212 ^ (8 * v211) ^ v210 ^ v207;
v214 = v209 ^ v212 ^ v211 ^ v208;
v215 = rotl(v213, 7);
v216 = rotl(v214, 1);
v217 = v215 ^ v211 ^ v216;
v218 = v215 ^ v212 ^ (v216 << 7);
v219 = rotl(v217, 5);
v220 = rotl(v218, 22);
v221 = readUInt32LE(this.buffer, (82 * 4) - 104) ^ v219;
v222 = readUInt32LE(this.buffer, (83 * 4) - 104) ^ v216;
v223 = readUInt32LE(this.buffer, (85 * 4) - 104) ^ v215;
v224 = v223 ^ v221;
v225 = readUInt32LE(this.buffer, (84 * 4) - 104) ^ v220 ^ (v223 ^ v221) & v223;
v226 = v225 | v222;
v227 = v225 ^ (v223 ^ v221 | ~v222);
v228 = v222 ^ ~(v223 ^ v221);
v229 = v227 & v221 ^ v226 & v228;
v230 = v229 & v228;
v231 = rotl(v227, 13);
v232 = rotl(v229, 3);
v233 = rotl(v232 ^ (8 * v231) ^ v224 ^ v226, 7);
v234 = rotl(v231 ^ v221 ^ v232 ^ v225 ^ v230, 1);
v235 = rotl(v233 ^ v231 ^ v234, 5);
v236 = rotl(v233 ^ v232 ^ (v234 << 7), 22);
v237 = readUInt32LE(this.buffer, (86 * 4) - 104) ^ v235;
v238 = readUInt32LE(this.buffer, (87 * 4) - 104) ^ v234;
v239 = readUInt32LE(this.buffer, (89 * 4) - 104) ^ v233;
v240 = v237 ^ ~v236 ^ readUInt32LE(this.buffer, (88 * 4) - 104) ^ (v239 ^ v237 | v238 ^ v237);
v241 = v240 & v239;
v242 = v240 ^ v238 ^ v237 ^ v240 & v239;
v243 = v240 & v239 | v238 ^ v237;
v244 = (v240 | ~v237) ^ v239 ^ v237;
v245 = v243 ^ v244;
v246 = v242 & v244;
v247 = rotl(v240, 13);
v248 = rotl(v245, 3);
v249 = rotl(v248 ^ v238 ^ (8 * v247) ^ v241 ^ v246, 7);
v250 = rotl(v248 ^ v247 ^ v242, 1);
v251 = rotl(v249 ^ v247 ^ v250, 5);
v252 = rotl(v249 ^ v248 ^ (v250 << 7), 22);
v253 = readUInt32LE(this.buffer, (90 * 4) - 104) ^ v251;
v254 = readUInt32LE(this.buffer, (91 * 4) - 104) ^ v250;
v255 = readUInt32LE(this.buffer, (93 * 4) - 104) ^ v249;
v256 = v255 ^ v253 ^ v254;
v257 = readUInt32LE(this.buffer, (92 * 4) - 104) ^ v252 ^ (v255 ^ v253 | ~v253);
v258 = v257 ^ v254;
v259 = (v257 ^ v254 | v255 ^ v253) ^ v255;
v260 = v259 & v257 ^ v256;
v261 = v259 ^ v257;
v262 = v261 & v256;
v263 = rotl(v260 ^ v261, 13);
v264 = rotl(v260, 3);
v265 = v264 ^ (8 * v263) ^ v257 ^ ~v262;
v266 = v264 ^ v263 ^ v258;
v267 = rotl(v265, 7);
v268 = rotl(v266, 1);
v269 = rotl(v267 ^ v263 ^ v268, 5);
v270 = rotl(v267 ^ v264 ^ (v268 << 7), 22);
v271 = readUInt32LE(this.buffer, (94 * 4) - 104) ^ v269;
v272 = readUInt32LE(this.buffer, (95 * 4) - 104) ^ v268;
v273 = readUInt32LE(this.buffer, (96 * 4) - 104) ^ v270;
v274 = readUInt32LE(this.buffer, (97 * 4) - 104) ^ v267;
v275 = v272 | ~v273;
v276 = (v275 ^ v274) & v271;
v277 = v276 ^ v273 ^ v272;
v278 = v274 ^ v271 ^ (v276 ^ v272 | v273 ^ v272);
v279 = (v278 ^ v276) & v277 ^ v275 & v274;
v280 = rotl(v278 ^ v276 ^ (v275 ^ v274 | ~v273) ^ v279, 13);
v281 = rotl(v279, 3);
v282 = v281 ^ (8 * v280) ^ v277;
v283 = v281 ^ v280 ^ v278;
v284 = rotl(v282, 7);
v285 = rotl(v283, 1);
v286 = rotl(v284 ^ v280 ^ v285, 5);
v287 = rotl(v284 ^ v281 ^ (v285 << 7), 22);
v288 = readUInt32LE(this.buffer, (98 * 4) - 104) ^ v286;
v289 = readUInt32LE(this.buffer, (99 * 4) - 104) ^ v285;
v290 = readUInt32LE(this.buffer, (100 * 4) - 104) ^ v287;
v291 = readUInt32LE(this.buffer, (101 * 4) - 104) ^ v284;
v292 = v291 ^ v288 ^ v290;
v293 = (v291 ^ v288) & v289;
v294 = v292 ^ v289;
v295 = v294 ^ v291 & v288;
v296 = v293 ^ v288;
v297 = (v296 | v290) ^ v294;
v298 = v295 & (v296 ^ v292);
v299 = rotl(v298 ^ ~v296, 13);
v300 = rotl(v297, 3);
v301 = rotl(v300 ^ (8 * v299) ^ v295, 7);
v302 = rotl(v298 ^ ~(v300 ^ v299 ^ v292), 1);
v303 = rotl(v301 ^ v299 ^ v302, 5);
v304 = rotl(v301 ^ v300 ^ (v302 << 7), 22);
v305 = readUInt32LE(this.buffer, (102 * 4) - 104) ^ v303;
v306 = readUInt32LE(this.buffer, (103 * 4) - 104) ^ v302;
v307 = v306 ^ v305;
v308 = readUInt32LE(this.buffer, (105 * 4) - 104) ^ v301;
v309 = v308 | ~(v306 ^ v305);
v310 = readUInt32LE(this.buffer, (104 * 4) - 104) ^ v304 ^ (v305 | ~(v306 ^ v305));
v311 = v310 ^ v308;
v312 = v309 ^ v306;
v313 = v307 ^ ~(v310 ^ v308);
v314 = v313 ^ v312 & v310;
v315 = v312 ^ v310;
v316 = rotl(v313 & (v312 ^ v310) ^ v310, 13);
v317 = rotl(v311, 3);
v318 = v314 ^ v317 ^ (8 * v316);
v319 = v314 ^ v317 ^ v316 ^ v315;
v320 = rotl(v318, 7);
v321 = rotl(v319, 1);
v322 = rotl(v320 ^ v316 ^ v321, 5);
v323 = rotl(v320 ^ v317 ^ (v321 << 7), 22);
v324 = readUInt32LE(this.buffer, (106 * 4) - 104) ^ v322;
v325 = readUInt32LE(this.buffer, (107 * 4) - 104) ^ v321;
v326 = readUInt32LE(this.buffer, (108 * 4) - 104) ^ v323;
v327 = readUInt32LE(this.buffer, (109 * 4) - 104);
v328 = v327 ^ v320 ^ v325 ^ v326 & ~v324;
v329 = v324 ^ ~v326;
v330 = (v328 ^ v326) & v325;
v331 = v330 ^ v329;
v332 = (v330 | v327 ^ v320) & (v328 | v329) ^ v324;
v333 = (v327 ^ ~v320) & ~v324;
v334 = rotl(v328, 13);
v335 = rotl(v332, 3);
v336 = v331 ^ v335 ^ v325 ^ v334 ^ v333 ^ v332;
v337 = rotl(v331 ^ v335 ^ (8 * v334), 7);
v338 = rotl(v336, 1);
v339 = v337 ^ v334 ^ v338;
v340 = v337 ^ v335 ^ (v338 << 7);
v341 = rotl(v339, 5);
v342 = rotl(v340, 22);
v343 = readUInt32LE(this.buffer, (110 * 4) - 104) ^ v341;
v344 = readUInt32LE(this.buffer, (111 * 4) - 104) ^ v338;
v345 = readUInt32LE(this.buffer, (112 * 4) - 104) ^ v342;
v346 = readUInt32LE(this.buffer, (113 * 4) - 104) ^ v337;
v347 = v345 ^ v343 ^ v346;
v348 = v347 & v343 ^ v346;
v349 = v348 & v344 ^ v347;
v350 = v346 | v344;
v351 = (v349 | v343) & v348;
v352 = (v346 | v343) ^ v344;
v353 = rotl((v347 & v343 ^ (v346 | v344)) & v345 ^ v352, 13);
v354 = rotl(v349, 3);
v355 = v351 ^ v354 ^ (8 * v353) ^ v352 ^ v349;
v356 = v351 ^ v354 ^ v353 ^ v350;
v357 = rotl(v355, 7);
v358 = rotl(v356, 1);
v359 = v357 ^ v353 ^ v358;
v360 = v357 ^ v354 ^ (v358 << 7);
v361 = rotl(v359, 5);
v362 = rotl(v360, 22);
v363 = readUInt32LE(this.buffer, (114 * 4) - 104) ^ v361;
v364 = readUInt32LE(this.buffer, (115 * 4) - 104) ^ v358;
v365 = readUInt32LE(this.buffer, (117 * 4) - 104) ^ v357;
v366 = v365 ^ v363;
v367 = readUInt32LE(this.buffer, (116 * 4) - 104) ^ v362 ^ (v365 ^ v363) & v365;
v368 = v367 | v364;
v369 = v367 ^ (v365 ^ v363 | ~v364);
v370 = v364 ^ ~(v365 ^ v363);
v371 = v369 & v363 ^ v368 & v370;
v372 = v371 & v370;
v373 = rotl(v369, 13);
v374 = rotl(v371, 3);
v375 = rotl(v374 ^ (8 * v373) ^ v366 ^ v368, 7);
v376 = rotl(v373 ^ v363 ^ v374 ^ v367 ^ v372, 1);
v377 = rotl(v375 ^ v373 ^ v376, 5);
v378 = rotl(v375 ^ v374 ^ (v376 << 7), 22);
v379 = readUInt32LE(this.buffer, (118 * 4) - 104) ^ v377;
v380 = readUInt32LE(this.buffer, (119 * 4) - 104) ^ v376;
v381 = readUInt32LE(this.buffer, (121 * 4) - 104) ^ v375;
v382 = v379 ^ ~v378 ^ readUInt32LE(this.buffer, (120 * 4) - 104) ^ (v381 ^ v379 | v380 ^ v379);
v383 = v382 & v381;
v384 = v382 ^ v380 ^ v379 ^ v382 & v381;
v385 = v382 & v381 | v380 ^ v379;
v386 = (v382 | ~v379) ^ v381 ^ v379;
v387 = v385 ^ v386;
v388 = v384 & v386;
v389 = rotl(v382, 13);
v390 = rotl(v387, 3);
v391 = rotl(v390 ^ v380 ^ (8 * v389) ^ v383 ^ v388, 7);
v392 = rotl(v390 ^ v389 ^ v384, 1);
v393 = rotl(v391 ^ v389 ^ v392, 5);
v394 = rotl(v391 ^ v390 ^ (v392 << 7), 22);
v395 = readUInt32LE(this.buffer, (122 * 4) - 104) ^ v393;
v396 = readUInt32LE(this.buffer, (123 * 4) - 104) ^ v392;
v397 = readUInt32LE(this.buffer, (125 * 4) - 104) ^ v391;
v398 = v397 ^ v395 ^ v396;
v399 = readUInt32LE(this.buffer, (124 * 4) - 104) ^ v394 ^ (v397 ^ v395 | ~v395);
v400 = v399 ^ v396;
v401 = (v399 ^ v396 | v397 ^ v395) ^ v397;
v402 = v401 & v399 ^ v398;
v403 = v401 ^ v399;
v404 = v403 & v398;
v405 = rotl(v402 ^ v403, 13);
v406 = rotl(v402, 3);
v407 = v406 ^ (8 * v405) ^ v399 ^ ~v404;
v408 = v406 ^ v405 ^ v400;
v409 = rotl(v407, 7);
v410 = rotl(v408, 1);
v411 = rotl(v409 ^ v405 ^ v410, 5);
v412 = rotl(v409 ^ v406 ^ (v410 << 7), 22);
v413 = readUInt32LE(this.buffer, (126 * 4) - 104) ^ v411;
v414 = readUInt32LE(this.buffer, (127 * 4) - 104) ^ v410;
v415 = readUInt32LE(this.buffer, (128 * 4) - 104) ^ v412;
v416 = readUInt32LE(this.buffer, (129 * 4) - 104) ^ v409;
v417 = v414 | ~v415;
v418 = (v417 ^ v416) & v413;
v419 = v418 ^ v415 ^ v414;
v420 = v416 ^ v413 ^ (v418 ^ v414 | v415 ^ v414);
v421 = (v420 ^ v418) & v419 ^ v417 & v416;
v422 = rotl(v420 ^ v418 ^ (v417 ^ v416 | ~v415) ^ v421, 13);
v423 = rotl(v421, 3);
v424 = v423 ^ (8 * v422) ^ v419;
v425 = v423 ^ v422 ^ v420;
v426 = rotl(v424, 7);
v427 = rotl(v425, 1);
v428 = rotl(v426 ^ v422 ^ v427, 5);
v429 = rotl(v426 ^ v423 ^ (v427 << 7), 22);
v430 = readUInt32LE(this.buffer, (130 * 4) - 104) ^ v428;
v431 =