cryptorand
package v0.27.3
Go to latest Published: Aug 1, 2023 License:AGPL-3.0
Opens a new window with list of versions in this module.
Latest LatestThis package is not in the latest version of its module.
Opens a new window with license information.
Imports:5 Opens a new window with list of imports.
Imported by:0 Opens a new window with list of known importers.
Details
Validgo.mod file
The Go module system was introduced in Go 1.11 and is the official dependency management solution for Go.
Redistributable license
Redistributable licenses place minimal restrictions on how software can be used, modified, and redistributed.
Tagged version
Modules with tagged versions give importers more predictable builds.
Stable version
When a project reaches major version v1 it is considered stable.
- Learn more about best practices
Repository
Links
Documentation¶
Index¶
- Constants
- func Element[T any](s []T) (out T, err error)
- func Float64() (float64, error)
- func HexString(size int) (string, error)
- func Int63() (int64, error)
- func Intn(max int) (int, error)
- func Sha1String() (string, error)
- func String(size int) (string, error)
- func StringCharset(charSetStr string, size int) (string, error)
Constants¶
View Source
const (// Numeric includes decimal numbers (0-9)Numeric = "0123456789"// Upper is uppercase characters in the Latin alphabetUpper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"// Lower is lowercase characters in the Latin alphabetLower = "abcdefghijklmnopqrstuvwxyz"// Alpha is upper or lowercase alphabetic charactersAlpha =Upper +Lower// Default is uppercase, lowercase, or numeric charactersDefault =Numeric +Alpha// Hex is hexadecimal lowercase charactersHex = "0123456789abcdef"// Human creates strings which are easily distinguishable from// others created with the same charset. It contains most lowercase// alphanumeric characters without 0,o,i,1,l.Human = "23456789abcdefghjkmnpqrstuvwxyz")
Charsets
Variables¶
This section is empty.
Functions¶
funcElement¶added inv0.5.11
Element returns a random element of the slice. An error will be returned ifthe slice has no elements in it.
funcSha1String¶
Sha1String returns a 40-character hexadecimal string, which matchesthe length of a SHA-1 hash (160 bits).
Types¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.