Documentation ¶
Overview ¶
Package ChaCha20 implements the core ChaCha20 function as specified in https://tools.ietf.org/html/rfc7539#section-2.3.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func XORKeyStream ¶
XORKeyStream crypts bytes from in to out using the given key and counters. In and out must overlap entirely or not at all. Counter contains the raw ChaCha20 counter bytes (i.e. block counter followed by nonce).
Types ¶
type Rng ¶
type Rng struct {
// contains filtered or unexported fields
}
Rng is a stateful random number generator returning the ChaCha20 key stream.
func (*Rng) ReadUint32 ¶
ReadUint32 returns a uint32 extracted in little-endian from the output.
Click to show internal directories.
Click to hide internal directories.