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

Method EncryptingKey

coderd/cryptokeys/cache.go:152–160  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

150}
151
152func (c *cache) EncryptingKey(ctx context.Context) (string, interface{}, error) {
153 if !isEncryptionKeyFeature(c.feature) {
154 return "", nil, ErrInvalidFeature
155 }
156
157 //nolint:gocritic // cache can only read crypto keys.
158 ctx = dbauthz.AsKeyReader(ctx)
159 return c.cryptoKey(ctx, latestSequence)
160}
161
162func (c *cache) DecryptingKey(ctx context.Context, id string) (interface{}, error) {
163 if !isEncryptionKeyFeature(c.feature) {

Callers

nothing calls this directly

Calls 3

cryptoKeyMethod · 0.95
AsKeyReaderFunction · 0.92
isEncryptionKeyFeatureFunction · 0.85

Tested by

no test coverage detected