Help us shape the future of Go! Take the 2026 Go Developer Survey

nonce

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildShortNonceWithPadding

func BuildShortNonceWithPadding(intPrefix int64, baseToken string) string

BuildShortNonceWithPadding generates a nonce from a baseToken and an integer prefix

func ComparePasswordHash

func ComparePasswordHash(password string, passwordHash string) bool

ComparePasswordHash compares a password and a password hash

func GUID

func GUID() string

GUID returns a UUIDv4 based on RFC 4122

func GenerateNonceFromString

func GenerateNonceFromString(str string) string

GenerateNonceFromString generates a sha1 encoded string from another string

func GeneratePasswordHash

func GeneratePasswordHash(password string) string

GeneratePasswordHash generates a password hash from a string password

func GenerateRandomString

func GenerateRandomString(stringLen int) string

GenerateRandomString returns a randomized string

func GenerateRandomStringUpperOnly

func GenerateRandomStringUpperOnly(stringLen int) string

GenerateRandomStringUpperOnly returns a randomized string

func ShortID

func ShortID() string

ShortID returns a shorter globally unique ID Uses the MongDB Object ID algorithm using base64 serialization to make it shorter

func ShortNonceWithPadding

func ShortNonceWithPadding(intPrefix int64, tokenLen int) string

ShortNonceWithPadding generates a padded nonce

Types

This section is empty.

Jump to

Keyboard shortcuts

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