MCPcopy Index your code
hub / github.com/getsops/sops / TestMasterKey_Encrypt

Function TestMasterKey_Encrypt

azkv/keysource_integration_test.go:34–42  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

32)
33
34func TestMasterKey_Encrypt(t *testing.T) {
35 key, err := createTestKMSKeyIfNotExists()
36 assert.NoError(t, err)
37
38 data := []byte("to be or not to be static bytes")
39 assert.NoError(t, key.Encrypt(data))
40 assert.NotEmpty(t, key.EncryptedDataKey())
41 assert.NotEqual(t, data, key.EncryptedKey)
42}
43
44func TestMasterKey_Decrypt(t *testing.T) {
45 key, err := createTestKMSKeyIfNotExists()

Callers

nothing calls this directly

Calls 3

EncryptMethod · 0.65
EncryptedDataKeyMethod · 0.65

Tested by

no test coverage detected