snefru

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package snefru implements the Snefru cryptographic hash.

Snefru is parameterised by its output size and the number of passes it makes over each block; NewWithParams takes both, and New uses the sizes CyberChef offers by default.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() hash.Hash

New returns a Snefru hash at CyberChef's default size and pass count.

func NewWithParams

func NewWithParams(lengthBits, rounds int) hash.Hash

NewWithParams builds Snefru with a given output length in bits and round count. A length that is not a multiple of 32 is floored to one, as crypto-api computes the word count with `length / 32 | 0`. The block size shrinks as the output grows (blockBytes = (16-words)*4), so a length outside [32, snefruMaxLengthBits] leaves no output or no block; that is a caller bug and panics.

Types

This section is empty.

Jump to

Keyboard shortcuts

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