Endo
    Preparing search index...

    Function makeChaCha12FromState

    • Reconstructs a ChaCha12Generator from a state snapshot returned by a previous getState() call. The reconstructed generator produces exactly the same subsequent keystream as the generator whose state was captured, and is fully independent of any other generator (including the original).

      The state shape is [base0..base15, counter, offset, block0..block15], 34 numbers total: 16 u32 base-state words, the next-block counter, the byte offset within the current block (0..64), and 16 u32 words encoding the 64-byte current block (little-endian). When offset === BLOCK_SIZE the block words are unused (the next read refills); they are included for shape uniformity.

      Throws TypeError for malformed state.

      Parameters

      • state: readonly number[]

      Returns ChaCha12Generator