diff --git a/pkg/crypto/crypto.go b/pkg/crypto/crypto.go index f9b5d7e1..c9764049 100644 --- a/pkg/crypto/crypto.go +++ b/pkg/crypto/crypto.go @@ -41,7 +41,7 @@ func (pkem *EncryptionManager) Encrypt(ctx context.Context, cred *v2.PlaintextDa return encryptedDatas, nil } -// MJP creating the providerMap means parsing the configs and failing early instead of in Encrypt +// MJP creating the providerMap means parsing the configs and failing early instead of in Encrypt. func NewEncryptionManager(ctx context.Context, co *v2.CredentialOptions, ec []*v2.EncryptionConfig) (*EncryptionManager, error) { // Group the encryption configs by provider providerMap := make(map[string]([]*v2.EncryptionConfig)) diff --git a/pkg/crypto/crypto_test.go b/pkg/crypto/crypto_test.go index a1030998..7da76ec8 100644 --- a/pkg/crypto/crypto_test.go +++ b/pkg/crypto/crypto_test.go @@ -105,7 +105,6 @@ func TestMultiRecipientEncrypton(t *testing.T) { require.NoError(t, err) _, err = provider.Decrypt(ctx, cipherText, badKey) require.Error(t, err) - } func testEncryptionProvider(t *testing.T, ctx context.Context, config *v2.EncryptionConfig, privKey []byte) { diff --git a/pkg/crypto/providers/jwk/jwk.go b/pkg/crypto/providers/jwk/jwk.go index ed90fafa..7e93c61a 100644 --- a/pkg/crypto/providers/jwk/jwk.go +++ b/pkg/crypto/providers/jwk/jwk.go @@ -135,9 +135,7 @@ func (j *JWKEncryptionProvider) Encrypt(ctx context.Context, configs []*v2.Encry Schema: plainText.Schema, EncryptedBytes: []byte(encCipherText), }) - } - return encrypted, nil }