ChaCha20Aligned::Seek

Set the 96-bit nonce and 32-bit block counter.

Synopsis

Declared in <crypto/chacha20.h>

void
Seek(
    Nonce96 nonce,
    uint32_t block_counter) noexcept;

Description

Block_counter selects a position to seek to (to byte BLOCKLEN*block_counter). After 256 GiB, the block counter overflows, and nonce.first is incremented.

Parameters

NameDescription
nonceThe 96-bit nonce to seek to.
block_counterThe 32-bit block counter selecting the position within the stream.