MCPcopy
hub / github.com/getsops/sops / Encrypt

Method Encrypt

sops.go:106–106  ·  view source on GitHub ↗

Encrypt takes a plaintext, a key and additional data and returns the plaintext encrypted with the key, using the additional data for authentication

(plaintext interface{}, key []byte, additionalData string)

Source from the content-addressed store, hash-verified

104 // Encrypt takes a plaintext, a key and additional data and returns the plaintext encrypted with the key, using the
105 // additional data for authentication
106 Encrypt(plaintext interface{}, key []byte, additionalData string) (ciphertext string, err error)
107 // Encrypt takes a ciphertext, a key and additional data and returns the ciphertext encrypted with the key, using
108 // the additional data for authentication
109 Decrypt(ciphertext string, key []byte, additionalData string) (plaintext interface{}, err error)

Callers 15

EncryptMethod · 0.65
encryptWithOpenPGPMethod · 0.65
TestMasterKey_EncryptFunction · 0.65
TestPGPFunction · 0.65
EncryptContextMethod · 0.65
EncryptTreeFunction · 0.65
TestRoundtripStringFunction · 0.65
TestRoundtripFloatFunction · 0.65
TestRoundtripIntFunction · 0.65
TestRoundtripBoolFunction · 0.65

Implementers 15

reverseCiphersops_test.go
encPrefixCiphersops_test.go
MockCiphersops_test.go
Treesops.go
MasterKeyhckms/keysource.go
MasterKeypgp/keysource.go
MasterKeygcpkms/keysource.go
mockKeyManagementServergcpkms/mock_kms_server_test.go
MasterKeykms/keysource.go
Serverkeyservice/server.go
keyServiceClientkeyservice/keyservice_grpc.pb.go
UnimplementedKeyServiceServerkeyservice/keyservice_grpc.pb.go

Calls

no outgoing calls

Tested by 14

TestMasterKey_EncryptFunction · 0.52
TestPGPFunction · 0.52
TestRoundtripStringFunction · 0.52
TestRoundtripFloatFunction · 0.52
TestRoundtripIntFunction · 0.52
TestRoundtripBoolFunction · 0.52
TestRoundtripTimeFunction · 0.52
TestEncryptEmptyCommentFunction · 0.52
TestMasterKey_EncryptFunction · 0.52
TestMasterKey_DecryptFunction · 0.52