hashutil

package module
v0.0.0-...-7773f22 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package hashutil ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AP

func AP(source string) uint64

APHash APHash @param str User ID @return uint64 hash

func BKDR

func BKDR(source string, seed uint64) uint64

BKDRHash BKDRHash @param str User ID @param seed Prime number seed @return uint64 hash

func DJB

func DJB(source string) uint64

DJBHash DJBHash @param str User ID @return uint64 hash

func GetBucketNum

func GetBucketNum(hashMethod protoc_cache_server.HashMethod, source string, seed int64, bucketSize int64) int64

GetBucketNum Get bucket num and return a number in the range [1, bucketSize]

func GetHashNum

func GetHashNum(hashMethod protoc_cache_server.HashMethod, source string, seed uint64) uint64

GetHashNum Get the hash value

func New

func New(source string) uint64

HashNew hash @param str User ID @return uint64

func NewMD5

func NewMD5(source string) uint64

hashNewMD5 md5 hashType @param guid User ID @return uint64 md5

Types

This section is empty.

Jump to

Keyboard shortcuts

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