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

Method Encrypt

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

Source from the content-addressed store, hash-verified

90}
91
92func (ks *keyService) Encrypt(ctx context.Context, plaintext []byte, label string) ([]byte, error) {
93 key, err := ks.aes128Key(ctx, label)
94 if err != nil {
95 return nil, err
96 }
97 return Encrypt(key, plaintext)
98}
99
100func (ks *keyService) ServerCertificate(ctx context.Context, label string) (tls.Certificate, error) {
101 return ks.vault.ServerCertificate(ctx, label)

Callers

nothing calls this directly

Calls 2

aes128KeyMethod · 0.95
EncryptFunction · 0.85

Tested by

no test coverage detected