shake

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package shake provides a thin wrapper around Go's standard library crypto/sha3 SHAKE256 implementation. This exists so go-hqc has zero external dependencies while maintaining a clean internal API boundary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

State wraps a SHAKE256 instance. After Write calls are complete, call Read to squeeze output. Write after Read panics (per SHAKE spec).

func New256

func New256() *State

New256 returns a new SHAKE256 state ready for absorbing.

func (*State) Read

func (st *State) Read(p []byte) (int, error)

Read squeezes output from the SHAKE state. It never returns an error; n always equals len(p).

func (*State) Reset

func (st *State) Reset()

Reset resets the state to a fresh SHAKE256, discarding all absorbed data.

func (*State) Write

func (st *State) Write(p []byte) (int, error)

Write absorbs data into the SHAKE state. It never returns an error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL