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.
Reconstructs a
ChaCha12Generatorfrom a state snapshot returned by a previousgetState()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). Whenoffset === BLOCK_SIZEthe block words are unused (the next read refills); they are included for shape uniformity.Throws
TypeErrorfor malformed state.