lsh512

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 2 Imported by: 4

Documentation

Overview

Package lsh512 implements the LSH-512, LSH-384, LSH-512-256, LSH-512-224 hash algorithms as defined in TTAK.KO-12.0276

Index

Constants

View Source
const (
	// The size of a LSH-512 checksum in bytes.
	Size = 64
	// The size of a LSH-384 checksum in bytes.
	Size384 = 48
	// The size of a LSH-512-256 checksum in bytes.
	Size256 = 32
	// The size of a LSH-512-224 checksum in bytes.
	Size224 = 28

	// The blocksize of LSH-512, LSH-384, LSH-512-256 and LSH-512-224 in bytes.
	BLOCKSIZE = 256
)

Variables

View Source
var ErrInvalidDataBitLen = errors.New("krypto/lsh512: bit level update is not allowed")

Functions

func New

func New() hash.Hash

New returns a new hash.Hash computing the LSH-512 checksum.

func New224

func New224() hash.Hash

New224 returns a new hash.Hash computing the LSH-512-224 checksum.

func New256

func New256() hash.Hash

New256 returns a new hash.Hash computing the LSH-512-256 checksum.

func New384

func New384() hash.Hash

New384 returns a new hash.Hash computing the LSH-384 checksum.

func Sum224

func Sum224(data []byte) (sum224 [Size224]byte)

Sum224 returns the LSH-512-224 checksum of the data.

func Sum256

func Sum256(data []byte) (sum256 [Size256]byte)

Sum256 returns the LSH-512-256 checksum of the data.

func Sum384

func Sum384(data []byte) (sum384 [Size384]byte)

Sum384 returns the LSH-384 checksum of the data.

func Sum512

func Sum512(data []byte) (sum [Size]byte)

Sum512 returns the LSH-512 checksum of the data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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