MCPcopy Index your code
hub / github.com/coder/coder / Validate

Function Validate

coderd/provisionerkey/provisionerkey.go:38–44  ·  view source on GitHub ↗
(token string)

Source from the content-addressed store, hash-verified

36}
37
38func Validate(token string) error {
39 if len(token) != secretLength {
40 return xerrors.Errorf("must be %d characters", secretLength)
41 }
42
43 return nil
44}
45
46func HashSecret(secret string) []byte {
47 return apikey.HashSecret(secret)

Callers 2

TestProvisionerKeysFunction · 0.92

Calls 1

ErrorfMethod · 0.45

Tested by 1

TestProvisionerKeysFunction · 0.74