MCPcopy Create free account
hub / github.com/rilldata/rill / SecretHash

Method SecretHash

admin/pkg/authtoken/authtoken.go:138–141  ·  view source on GitHub ↗

SecretHash returns a SHA256 hash of the token secret.

()

Source from the content-addressed store, hash-verified

136
137// SecretHash returns a SHA256 hash of the token secret.
138func (t *Token) SecretHash() []byte {
139 hashed := sha256.Sum256(t.Secret[:])
140 return hashed[:]
141}
142
143// Prefix returns a safe, partial display string for the token, e.g., "rill_usr_abcdefghij".
144// This works even if t.Secret is empty (all zeroes), as long as t.ID is set.

Callers 6

IssueUserAuthTokenMethod · 0.80
IssueServiceAuthTokenMethod · 0.80
IssueMagicAuthTokenMethod · 0.80
TestReciprocityFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestReciprocityFunction · 0.64