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

Method Decrypt

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

Source from the content-addressed store, hash-verified

82}
83
84func (ks *keyService) Decrypt(ctx context.Context, ciphertext []byte, label string) ([]byte, error) {
85 key, err := ks.aes128Key(ctx, label)
86 if err != nil {
87 return nil, err
88 }
89 return Decrypt(key, ciphertext)
90}
91
92func (ks *keyService) Encrypt(ctx context.Context, plaintext []byte, label string) ([]byte, error) {
93 key, err := ks.aes128Key(ctx, label)

Callers

nothing calls this directly

Calls 2

aes128KeyMethod · 0.95
DecryptFunction · 0.85

Tested by

no test coverage detected