crypto

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CharsetLetterLower = "abcdefghijklmnopqrstuvwxyz"
	CharsetLetterUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
	CharsetNumber      = "0123456789"
	CharsetSymbol      = "!@#$%^&*"

	CharsetLetter          = CharsetLetterLower + CharsetLetterUpper
	CharsetLetterAndNumber = CharsetLetter + CharsetNumber
	CharsetAscii           = CharsetLetterAndNumber + CharsetSymbol
)

Variables

This section is empty.

Functions

func RandInt

func RandInt(min, max int) int

RandInt returns a uniform random value in [min, max). It panics if max <= 0 and return 0 if min > max.

func RandString

func RandString(length int, charsets ...string) string

RandString generate with CharsetLetterAndNumber

Types

This section is empty.

Jump to

Keyboard shortcuts

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