Documentation ¶
Index ¶
- func DeriveKey256[S any](sch Scheme[S], dst []byte, base *[32]byte, info []byte)
- func Sum[S any](sch Scheme[S], dst []byte, in []byte)
- func Sum256[S any](sch Scheme[S], in []byte) (ret [32]byte)
- func Sum512[S any](sch Scheme[S], in []byte) (ret [64]byte)
- func SumMany[S any](sch Scheme[S], dst []byte, ins ...[]byte)
- func TestScheme[S any](t *testing.T, s Scheme[S])
- func XOROut[T any](sch Scheme[T], x *T, dst, src []byte)
- type Reader
- type Scheme
- type Writer
- type XORExpander
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveKey256 ¶
DeriveKey256 deterministically derives a key from base and info. - `dst` is filled with the output. - `base` must have 256 bits of entropy, and should be kept secret. If base is weak, derived keys will be also be weak. - `info` can be anything, but should be distinct from other infos used with this base key. info is not secret.
Types ¶
type Reader ¶
func NewRand256 ¶
NewRand256 seeds a random number generator using seed and returns it.
type Scheme ¶
type Scheme[State any] interface { // New creates a new instance of the XOF New() State // Absorb appends data to the input of the XOF by modifying s Absorb(s *State, data []byte) // Expand reads out data from the XOF, and evolves s as needed to account for the read bytes. Expand(s *State, data []byte) // Reset sets s to it's initial state. Reset(s *State) }
type XORExpander ¶
Directories ¶
Path | Synopsis |
---|---|
internal/sha3
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202.
|
Package sha3 implements the SHA-3 fixed-output-length hash functions and the SHAKE variable-output-length hash functions defined by FIPS-202. |
Click to show internal directories.
Click to hide internal directories.