MCPcopy
hub / github.com/pocketbase/pocketbase / PseudorandomString

Function PseudorandomString

tools/security/random.go:42–44  ·  view source on GitHub ↗

PseudorandomString generates a pseudorandom string with the specified length. The generated string matches [A-Za-z0-9]+ and it's transparent to URL-encoding. For a cryptographically random string (but a little bit slower) use RandomString instead.

(length int)

Source from the content-addressed store, hash-verified

40//
41// For a cryptographically random string (but a little bit slower) use RandomString instead.
42func PseudorandomString(length int) string {
43 return PseudorandomStringWithAlphabet(length, defaultRandomAlphabet)
44}
45
46// PseudorandomStringWithAlphabet generates a pseudorandom string
47// with the specified length and characters set.

Callers 15

sendMethod · 0.92
TestMoveDirContentFunction · 0.92
resolveTokenFunction · 0.92
BuildMethod · 0.92
BuildMethod · 0.92
generateHookIdFunction · 0.92
TestRecordPasswordFunction · 0.92
SyncRecordTableSchemaMethod · 0.92

Calls 1

Tested by 6

TestMoveDirContentFunction · 0.74
TestRecordPasswordFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…