tuplehash

package
v0.2202.13 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package tuplehash implements TupleHash from NIST SP 800-15.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

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

Hasher is a TupleHash instance.

func New128

func New128(outputSize int, customizationString []byte) *Hasher

New128 creates a new TupleHash128 instance with the specified output size (in bytes) and customization string.

func New256

func New256(outputSize int, customizationString []byte) *Hasher

New256 creates a new TupleHash256 instance with the specified output size (in bytes) and customization string.

func (*Hasher) Clone

func (h *Hasher) Clone() *Hasher

Clone creates a copy of an existing TupleHash instance.

func (*Hasher) Sum

func (h *Hasher) Sum(b []byte) []byte

Sum appends the current hash to b and returns the resulting slice. It does not change the underlying hash state.

func (*Hasher) Write

func (h *Hasher) Write(b []byte) (int, error)

Write writes the byte-encoded tuple b to the TupleHash.

Jump to

Keyboard shortcuts

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