hash

package
v0.0.0-...-ee6bf62 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCodeLength = errors.New("codes length is not 63")
)

Functions

func Base32Encode

func Base32Encode(targets []int32) string

func Base64Encode

func Base64Encode(targets []int32) string

func GetHashId

func GetHashId(uid int64, prefix string) string

func GetHashIdWithIds

func GetHashIdWithIds(ids []int, mLen int) string

Types

type RandomBytes

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

func NewRandomBytes

func NewRandomBytes() *RandomBytes

func (*RandomBytes) Generate

func (r *RandomBytes) Generate(n int) ([]byte, error)

随机生成指定长度字符串

func (*RandomBytes) SetCodes

func (r *RandomBytes) SetCodes(codes string) error

Jump to

Keyboard shortcuts

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