nonce

package
v1.8.94 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 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