xid

package module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 5 Imported by: 0

README

Go Go Reference

xid-go

Experimental, do not use.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(inputs ...[]byte) string

Hash returns a base32-encoded 192-bit hash of inputs.

func HashStrings added in v0.4.0

func HashStrings(strings ...string) string

HashString returns a base32-encoded 192-bit hash of strings.

func IsValidHash

func IsValidHash(xid string) bool

func IsValidRandom

func IsValidRandom(xid string) bool

func IsValidTimeAndHash

func IsValidTimeAndHash(xid string) bool

func IsValidTimeAndRandom

func IsValidTimeAndRandom(xid string) bool

func Random

func Random() string

Random returns a base32-encoded string of 192 random bits.

func TimeAndHash

func TimeAndHash(time time.Time, inputs ...[]byte) string

TimeAndHash returns a base32-encoded string of a 64-bit timestamp followed by a 128-bit hash of inputs.

func TimeAndHashStrings added in v0.4.0

func TimeAndHashStrings(time time.Time, strings ...string) string

TimeAndRandomString returns a base32-encoded string of a 64-bit timestamp followed by a 128-bit hash of strings.

func TimeAndRandom

func TimeAndRandom(time time.Time) string

TimeAndRandom returns a base32-encoded string of a 64-bit timestamp followed by 128 random bits.

Types

This section is empty.

Jump to

Keyboard shortcuts

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