deriveChunkNonce
deriveChunkNonce(
baseNonce,chunkIndex,isLast):Uint8Array
Defined in: packages/filecoin-encryption-envelope/src/nonce.ts:17
Derive the 12-byte AEAD nonce for one chunk:
baseNonce (7) ‖ chunkIndex (4, big-endian) ‖ last_flag (1).
Returns a freshly allocated array; baseNonce is never mutated.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
baseNonce | Uint8Array |
chunkIndex | number |
isLast | boolean |