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

Method String

admin/pkg/authtoken/authtoken.go:130–135  ·  view source on GitHub ↗

String canonically encodes the token as string.

()

Source from the content-addressed store, hash-verified

128
129// String canonically encodes the token as string.
130func (t *Token) String() string {
131 payload := make([]byte, 40)
132 copy(payload[0:16], t.ID[:])
133 copy(payload[16:40], t.Secret[:])
134 return fmt.Sprintf("%s_%s_%s", Prefix, t.Type, marshalBase62(payload))
135}
136
137// SecretHash returns a SHA256 hash of the token secret.
138func (t *Token) SecretHash() []byte {

Callers 3

PrefixMethod · 0.95
TestNullFunction · 0.95
TestPartiallyNullFunction · 0.95

Calls 1

marshalBase62Function · 0.85

Tested by 2

TestNullFunction · 0.76
TestPartiallyNullFunction · 0.76