hash

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CRC32

func CRC32(data []byte, table *crc32.Table) uint32

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

func CRC32IEEE

func CRC32IEEE(data []byte) uint32

CRC32IEEE uses ieee table to checksum data.

func CRC64

func CRC64(data []byte, table *crc64.Table) uint64

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

func CRC64ECMA

func CRC64ECMA(data []byte) uint64

CRC64ECMA uses ecma table to checksum data.

func CRC64ISO

func CRC64ISO(data []byte) uint64

CRC64ISO uses iso table to checksum data.

func Fnv128

func Fnv128(data []byte, opts ...Option) []byte

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

func Fnv128a

func Fnv128a(data []byte, opts ...Option) []byte

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

func Fnv32

func Fnv32(data []byte) uint32

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

func Fnv32a

func Fnv32a(data []byte) uint32

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

func Fnv64

func Fnv64(data []byte) uint64

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

func Fnv64a

func Fnv64a(data []byte) uint64

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

func MD5

func MD5(data []byte, opts ...Option) []byte

MD5 uses md5 to hash data.

func SHA1

func SHA1(data []byte, opts ...Option) []byte

SHA1 uses sha1 to hash data.

func SHA224

func SHA224(data []byte, opts ...Option) []byte

SHA224 uses sha224 to hash data.

func SHA256

func SHA256(data []byte, opts ...Option) []byte

SHA256 uses sha256 to hash data.

func SHA384

func SHA384(data []byte, opts ...Option) []byte

SHA384 uses sha384 to hash data.

func SHA512

func SHA512(data []byte, opts ...Option) []byte

SHA512 uses sha512 to hash data.

Types

type Config added in v0.5.2

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

func (*Config) Apply added in v0.5.2

func (c *Config) Apply(opts ...Option) *Config

type Option added in v0.5.2

type Option func(conf *Config)

func WithBase64 added in v0.5.2

func WithBase64() Option

WithBase64 sets base64 encoding to config.

func WithHex added in v0.5.2

func WithHex() Option

WithHex sets hex encoding to config.

Jump to

Keyboard shortcuts

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