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

Method Encrypt

pkg/crypto/keyservice.go:38–38  ·  view source on GitHub ↗

Encrypt encrypts messages of variable length using AES 128 GCM. The encryption key is referenced using the label.

(ctx context.Context, plaintext []byte, label string)

Source from the content-addressed store, hash-verified

36 // Encrypt encrypts messages of variable length using AES 128 GCM.
37 // The encryption key is referenced using the label.
38 Encrypt(ctx context.Context, plaintext []byte, label string) ([]byte, error)
39 // Decrypt decrypts messages of variable length using AES 128 GCM.
40 // The encryption key is referenced using the label.
41 Decrypt(ctx context.Context, ciphertext []byte, label string) ([]byte, error)

Callers 13

TestMemKeyVaultFunction · 0.95
ComputePingOffsetFunction · 0.65
DecryptJoinAcceptFunction · 0.65
WrapKeyFunction · 0.65
deriveSKeyFunction · 0.65
deriveLegacySKeyFunction · 0.65
deriveDeviceKeyFunction · 0.65
encryptMessageFunction · 0.65
DeriveRootWorSKeyFunction · 0.65
createEndDeviceMethod · 0.65
updateEndDeviceMethod · 0.65
createGatewayMethod · 0.65

Implementers 2

keyServicepkg/crypto/keyservice.go
mockKeyServicepkg/crypto/cryptoutil/keyservice_cache

Calls

no outgoing calls

Tested by 1

TestMemKeyVaultFunction · 0.76