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

Function randomAPIKeyParts

coderd/httpmw/apikey_test.go:42–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40)
41
42func randomAPIKeyParts() (id string, secret string, hashedSecret []byte) {
43 id, _ = cryptorand.String(10)
44 secret, hashedSecret, _ = apikey.GenerateSecret(22)
45 return id, secret, hashedSecret
46}
47
48func TestAPIKey(t *testing.T) {
49 t.Parallel()

Callers 3

TestAPIKeyFunction · 0.85
TestWorkspaceParamFunction · 0.85
addUserFunction · 0.85

Calls 2

StringFunction · 0.92
GenerateSecretFunction · 0.92

Tested by

no test coverage detected