hash

Imports

Imports #

"crypto/sha256"
"hash"

Constants & Variables

Size16 const #

Size16 is the size of the 16-byte hash checksum.

const Size16 = 16

Size20 const #

Size20 is the size of the 20-byte hash checksum.

const Size20 = 20

Size32 const #

Size32 is the size of the 32-byte hash checksum.

const Size32 = 32

Structs

shortHash struct #

type shortHash struct {
hash.Hash
n int
}

Functions

New16 function #

New16 returns a new [hash.Hash] computing the 16 bytes hash checksum.

func New16() hash.Hash

New20 function #

New20 returns a new [hash.Hash] computing the 20 bytes hash checksum.

func New20() hash.Hash

New32 function #

New32 returns a new [hash.Hash] computing the 32 bytes hash checksum.

func New32() hash.Hash

Sum method #

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

Sum16 function #

Sum16 returns the 16 bytes checksum of the data.

func Sum16(data []byte) [Size16]byte

Sum20 function #

Sum20 returns the 20 bytes checksum of the data.

func Sum20(data []byte) [Size20]byte

Sum32 function #

Sum32 returns the 32 bytes checksum of the data.

func Sum32(data []byte) [Size32]byte

Generated with Arrow