Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

cryptorand

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:5Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

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

funcElementadded inv0.5.11

func Element[Tany](s []T) (out T, errerror)

Element returns a random element of the slice. An error will be returned ifthe slice has no elements in it.

funcFloat64

func Float64() (float64,error)

Float64 returns a random number in [0.0,1.0) as a float64.

funcHexString

func HexString(sizeint) (string,error)

HexString returns a hexadecimal string of given length.

funcInt63

func Int63() (int64,error)

Int64 returns a non-negative random 63-bit integer as a int64.

funcIntn

func Intn(maxint) (int,error)

Intn returns a non-negative integer in [0,max) as an int.

funcSha1String

func Sha1String() (string,error)

Sha1String returns a 40-character hexadecimal string, which matchesthe length of a SHA-1 hash (160 bits).

funcString

func String(sizeint) (string,error)

String returns a random string using Default.

funcStringCharset

func StringCharset(charSetStrstring, sizeint) (string,error)

StringCharset generates a random string using the provided charset and size.

Types

This section is empty.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp