MCPcopy
hub / github.com/opencloud-eu/opencloud / GenerateRandomPassword

Function GenerateRandomPassword

pkg/generators/password.go:20–22  ·  view source on GitHub ↗

GenerateRandomPassword generates a random password with the given length. The password will contain chars picked from the `PasswordChars` constant. If an error happens, the string will be empty and the error will be non-nil. This is equivalent to `GenerateRandomString(PasswordChars, length)`

(length int)

Source from the content-addressed store, hash-verified

18//
19// This is equivalent to `GenerateRandomString(PasswordChars, length)`
20func GenerateRandomPassword(length int) (string, error) {
21 return generateString(PasswordChars, length)
22}
23
24// GenerateRandomString generates a random string with the given length
25// based on the chars provided. You can use `PasswordChars` or `AlphaNumChars`

Callers 1

CreateConfigFunction · 0.92

Calls 1

generateStringFunction · 0.85

Tested by

no test coverage detected