hash

package
v0.1.2-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TableIEEE is ieee table for crc32.
	TableIEEE = crc32.IEEETable

	// TableISO is iso table for crc64.
	TableISO = crc64.MakeTable(crc64.ISO)

	// TableECMA is ecma table for crc64.
	TableECMA = crc64.MakeTable(crc64.ECMA)
)

Functions

func CRC32

func CRC32(data cryptox.Bytes, table *Table32) (cryptox.Bytes, uint32)

CRC32 uses given table to checksum data. Use IEEE table if passed table is nil.

func CRC32IEEE

func CRC32IEEE(data cryptox.Bytes) (cryptox.Bytes, uint32)

CRC32IEEE uses ieee table to checksum data.

func CRC64

func CRC64(data cryptox.Bytes, table *Table64) (cryptox.Bytes, uint64)

CRC64 uses given table to checksum data. Use ISO table if passed table is nil.

func CRC64ECMA

func CRC64ECMA(data cryptox.Bytes) (cryptox.Bytes, uint64)

CRC64ECMA uses ecma table to checksum data.

func CRC64ISO

func CRC64ISO(data cryptox.Bytes) (cryptox.Bytes, uint64)

CRC64ISO uses iso table to checksum data.

func Fnv128

func Fnv128(data cryptox.Bytes) cryptox.Bytes

Fnv128 uses fnv-1/128bit to hash data.

func Fnv128a

func Fnv128a(data cryptox.Bytes) cryptox.Bytes

Fnv128a uses fnv-1a/128bit to hash data.

func Fnv32

func Fnv32(data cryptox.Bytes) (cryptox.Bytes, uint32)

Fnv32 uses fnv-1/32bit to hash data.

func Fnv32a

func Fnv32a(data cryptox.Bytes) (cryptox.Bytes, uint32)

Fnv32a uses fnv-1a/32bit to hash data.

func Fnv64

func Fnv64(data cryptox.Bytes) (cryptox.Bytes, uint64)

Fnv64 uses fnv-1/64bit to hash data.

func Fnv64a

func Fnv64a(data cryptox.Bytes) (cryptox.Bytes, uint64)

Fnv64a uses fnv-1a/64bit to hash data.

func HMAC

func HMAC(hash cryptox.Hash, key cryptox.Bytes, data cryptox.Bytes) cryptox.Bytes

HMAC hashes data with hash and key.

func MD5

func MD5(data cryptox.Bytes) cryptox.Bytes

MD5 hashes data with md5.

func SHA1

func SHA1(data cryptox.Bytes) cryptox.Bytes

SHA1 hashes data with sha1.

func SHA224

func SHA224(data cryptox.Bytes) cryptox.Bytes

SHA224 hashes data with sha224.

func SHA256

func SHA256(data cryptox.Bytes) cryptox.Bytes

SHA256 hashes data with sha256.

func SHA384

func SHA384(data cryptox.Bytes) cryptox.Bytes

SHA384 hashes data with sha384.

func SHA512

func SHA512(data cryptox.Bytes) cryptox.Bytes

SHA512 hashes data with sha512.

Types

type Table32

type Table32 = crc32.Table

Table32 is an alias of crc32.Table.

type Table64

type Table64 = crc64.Table

Table64 is an alias of crc64.Table.

Jump to

Keyboard shortcuts

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