generate

package
v0.0.0-...-0bd2313 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AlphaNum      = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
	Alpha         = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
	AlphaLowerNum = []rune("abcdefghijklmnopqrstuvwxyz0123456789")
	AlphaUpperNum = []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789")
	AlphaLower    = []rune("abcdefghijklmnopqrstuvwxyz")
	AlphaUpper    = []rune("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
	Numeric       = []rune("0123456789")
)

Functions

func EncodeMD5

func EncodeMD5(str string) string

func EncodeSha1

func EncodeSha1(str string) string

func EncodeSha256

func EncodeSha256(str string) string

func HFUID

func HFUID() string

func Init

func Init() error

func RandCode

func RandCode() string

func RandomInt

func RandomInt(limit int64) (int64, error)

func RandomString

func RandomString(l int, allowedRunes []rune) string

func ResetPasswordCode

func ResetPasswordCode(email string) string

func RuneSequence

func RuneSequence(l int, allowedRunes []rune) (seq []rune, err error)

func SessionToken

func SessionToken() string

func TruncateString

func TruncateString(str string, limit int) string

func UID

func UID() uint64

func VerificationCode

func VerificationCode(email string) string

func VerifyResetPasswordCode

func VerifyResetPasswordCode(code, email string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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