armhash

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes[T any](hash Hasher[T], bts []byte) (T, error)

Bytes hashes given bytes using provided hasher.

func CRC32

func CRC32(r io.Reader) (uint32, error)

CRC32 calculates IEEE CRC32 checksum IEEE is by far and away the most common CRC-32 polynomial. Used by ethernet (IEEE 802.3), v.42, fddi, gzip, zip, png, ... Produces same result as MySQL and PHP.

func SHA256

func SHA256(r io.Reader) ([]byte, error)

SHA256 is a plain SHA-256 implementation

func String

func String[T any](hash Hasher[T], s string) (T, error)

String hashes given string using provided hasher.

Types

type Hasher

type Hasher[T any] func(io.Reader) (T, error)

Hasher defines functions that can be used to produce hash This functions works with io.Reader for maximum versatility.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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