hash

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRC32

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

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

func CRC32IEEE

func CRC32IEEE(bs cryptox.Bytes) uint32

CRC32IEEE uses ieee table to checksum bs.

func CRC64

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

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

func CRC64ECMA

func CRC64ECMA(bs cryptox.Bytes) uint64

CRC64ECMA uses ecma table to checksum bs.

func CRC64ISO

func CRC64ISO(bs cryptox.Bytes) uint64

CRC64ISO uses iso table to checksum bs.

func Fnv128

func Fnv128(bs cryptox.Bytes) cryptox.Bytes

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

func Fnv128a

func Fnv128a(bs cryptox.Bytes) cryptox.Bytes

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

func Fnv32

func Fnv32(bs cryptox.Bytes) uint32

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

func Fnv32a

func Fnv32a(bs cryptox.Bytes) uint32

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

func Fnv64

func Fnv64(bs cryptox.Bytes) uint64

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

func Fnv64a

func Fnv64a(bs cryptox.Bytes) uint64

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

func MD5

func MD5(bs cryptox.Bytes) cryptox.Bytes

MD5 uses md5 to hash bs.

func SHA1

func SHA1(bs cryptox.Bytes) cryptox.Bytes

SHA1 uses sha1 to hash bs.

func SHA224

func SHA224(bs cryptox.Bytes) cryptox.Bytes

SHA224 uses sha224 to hash bs.

func SHA256

func SHA256(bs cryptox.Bytes) cryptox.Bytes

SHA256 uses sha256 to hash bs.

func SHA384

func SHA384(bs cryptox.Bytes) cryptox.Bytes

SHA384 uses sha384 to hash bs.

func SHA512

func SHA512(bs cryptox.Bytes) cryptox.Bytes

SHA512 uses sha512 to hash bs.

Types

type HMACPack added in v0.3.2

type HMACPack struct {
	// contains filtered or unexported fields
}

HMACPack packs some HMAC functions. You should use HMAC() directly.

func HMAC

func HMAC(key cryptox.Bytes) HMACPack

HMAC returns the HMACPack to use some HMAC functions.

func (HMACPack) MD5 added in v0.3.2

func (hp HMACPack) MD5(bs cryptox.Bytes) (cryptox.Bytes, error)

MD5 uses hmac-md5 to hash bs and returns an error if failed.

func (HMACPack) SHA1 added in v0.3.2

func (hp HMACPack) SHA1(bs cryptox.Bytes) (cryptox.Bytes, error)

SHA1 uses hmac-sha1 to hash bs and returns an error if failed.

func (HMACPack) SHA224 added in v0.3.2

func (hp HMACPack) SHA224(bs cryptox.Bytes) (cryptox.Bytes, error)

SHA224 uses hmac-sha224 to hash bs and returns an error if failed.

func (HMACPack) SHA256 added in v0.3.2

func (hp HMACPack) SHA256(bs cryptox.Bytes) (cryptox.Bytes, error)

SHA256 uses hmac-sha256 to hash bs and returns an error if failed.

func (HMACPack) SHA384 added in v0.3.2

func (hp HMACPack) SHA384(bs cryptox.Bytes) (cryptox.Bytes, error)

SHA384 uses hmac-sha384 to hash bs and returns an error if failed.

func (HMACPack) SHA512 added in v0.3.2

func (hp HMACPack) SHA512(bs cryptox.Bytes) (cryptox.Bytes, error)

SHA512 uses hmac-sha512 to hash bs and returns an error if failed.

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