MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / hashAPIKey

Function hashAPIKey

internal/identity/store.go:3377–3380  ·  view source on GitHub ↗
(plaintext string)

Source from the content-addressed store, hash-verified

3375}
3376
3377func hashAPIKey(plaintext string) string {
3378 h := sha256.Sum256([]byte(plaintext))
3379 return hex.EncodeToString(h[:])
3380}
3381
3382// CreateAPIKey issues a fresh ACCOUNT-scoped API key for the user. expiresAt is
3383// the optional hard expiration; pass nil to issue a never-expiring key (the

Callers 2

CreateScopedAPIKeyMethod · 0.85
GetPrincipalByAPIKeyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected