MCPcopy Create free account
hub / github.com/daodst/chat / GenerateNonce

Method GenerateNonce

clientapi/routing/register_secret.go:53–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51}
52
53func (r *SharedSecretRegistration) GenerateNonce() string {
54 nonce := util.RandomString(16)
55 r.nonces.Set(nonce, true, cache.DefaultExpiration)
56 return nonce
57}
58
59func (r *SharedSecretRegistration) validNonce(nonce string) bool {
60 _, exists := r.nonces.Get(nonce)

Callers 1

SetupFunction · 0.95

Calls 1

SetMethod · 0.65

Tested by

no test coverage detected