MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / Unwrap

Method Unwrap

pkg/crypto/keyservice.go:116–122  ·  view source on GitHub ↗
(ctx context.Context, ciphertext []byte, label string)

Source from the content-addressed store, hash-verified

114}
115
116func (ks *keyService) Unwrap(ctx context.Context, ciphertext []byte, label string) ([]byte, error) {
117 key, err := ks.vault.Key(ctx, label)
118 if err != nil {
119 return nil, err
120 }
121 return UnwrapKey(ciphertext, key)
122}
123
124func (ks *keyService) Wrap(ctx context.Context, plaintext []byte, label string) ([]byte, error) {
125 key, err := ks.vault.Key(ctx, label)

Callers

nothing calls this directly

Calls 2

UnwrapKeyFunction · 0.85
KeyMethod · 0.65

Tested by

no test coverage detected