metrohash

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MetroHash64

func MetroHash64(data []byte, seed uint64) uint64

MetroHash64 计算 MetroHash64

func MetroHash64String

func MetroHash64String(s string, seed uint64) uint64

MetroHash64String 计算字符串的 MetroHash64

func SumHex

func SumHex(data []byte) string

SumHex 计算 MetroHash64 并返回十六进制字符串

Types

type MetroHasher

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

MetroHasher MetroHash64 哈希器

func NewMetroHasher

func NewMetroHasher() *MetroHasher

NewMetroHasher 创建 MetroHash64 哈希器

func NewMetroHasherWithSeed

func NewMetroHasherWithSeed(seed uint64) *MetroHasher

NewMetroHasherWithSeed 创建带种子的 MetroHash64 哈希器

func (*MetroHasher) Sum

func (h *MetroHasher) Sum(data []byte) []byte

Sum 返回哈希值的字节切片

func (*MetroHasher) Sum64

func (h *MetroHasher) Sum64(data []byte) uint64

Sum64 计算 MetroHash64 哈希值

func (*MetroHasher) SumHex

func (h *MetroHasher) SumHex(data []byte) string

SumHex 返回哈希值的十六进制字符串

func (*MetroHasher) Type

func (h *MetroHasher) Type() common.IntegrityType

Type 返回校验类型

Jump to

Keyboard shortcuts

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