INNER CODE UNIT · TypeScript
blockBytes
paulmillr/noble-ciphers · src/_arx.ts:419
const blockBytes = full * this.blockLen;
const b = out.subarray(outPos, outPos + blockBytes);
this.cipher(this.key, this.nonce, b as TRet<Uint8Array>, b as TRet<Uint8Array>, this.ctr);
this.ctr += full;
outPos += blockBytes;
}
// Save leftovers
const left = len - outPos;
if (left > 0) {
this.buf.fill(0);
// NOTE: cipher will handle overflow
this.cipher(
this.key,
this.nonce,
this.buf as TRet<Uint8Array>,
this.buf as TRet<Uint8Array>,
this.ctr++
);