Class FieldLevelEncryptionConfigBuilder
- java.lang.Object
-
- com.mastercard.developer.encryption.FieldLevelEncryptionConfigBuilder
-
public class FieldLevelEncryptionConfigBuilder extends Object
A builder class forFieldLevelEncryptionConfig
.
-
-
Field Summary
Fields Modifier and Type Field Description protected PrivateKey
decryptionKey
protected Map<String,String>
decryptionPaths
protected String
encryptedValueFieldName
protected Certificate
encryptionCertificate
protected PublicKey
encryptionKey
protected String
encryptionKeyFingerprint
protected Map<String,String>
encryptionPaths
protected Integer
ivSize
-
Constructor Summary
Constructors Constructor Description FieldLevelEncryptionConfigBuilder()
-
Method Summary
-
-
-
Field Detail
-
encryptionCertificate
protected Certificate encryptionCertificate
-
encryptionKey
protected PublicKey encryptionKey
-
encryptionKeyFingerprint
protected String encryptionKeyFingerprint
-
decryptionKey
protected PrivateKey decryptionKey
-
encryptedValueFieldName
protected String encryptedValueFieldName
-
ivSize
protected Integer ivSize
-
-
Method Detail
-
aFieldLevelEncryptionConfig
public static FieldLevelEncryptionConfigBuilder aFieldLevelEncryptionConfig()
Get an instance of the builder.
-
withEncryptionCertificate
public FieldLevelEncryptionConfigBuilder withEncryptionCertificate(Certificate encryptionCertificate)
-
withEncryptionCertificateFingerprint
public FieldLevelEncryptionConfigBuilder withEncryptionCertificateFingerprint(String encryptionCertificateFingerprint)
-
withEncryptionKeyFingerprint
public FieldLevelEncryptionConfigBuilder withEncryptionKeyFingerprint(String encryptionKeyFingerprint)
-
withDecryptionKey
public FieldLevelEncryptionConfigBuilder withDecryptionKey(PrivateKey decryptionKey)
-
withEncryptionPath
public FieldLevelEncryptionConfigBuilder withEncryptionPath(String jsonPathIn, String jsonPathOut)
-
withDecryptionPath
public FieldLevelEncryptionConfigBuilder withDecryptionPath(String jsonPathIn, String jsonPathOut)
-
withOaepPaddingDigestAlgorithm
public FieldLevelEncryptionConfigBuilder withOaepPaddingDigestAlgorithm(String oaepPaddingDigestAlgorithm)
-
withIvFieldName
public FieldLevelEncryptionConfigBuilder withIvFieldName(String ivFieldName)
-
withOaepPaddingDigestAlgorithmFieldName
public FieldLevelEncryptionConfigBuilder withOaepPaddingDigestAlgorithmFieldName(String oaepPaddingDigestAlgorithmFieldName)
-
withEncryptedKeyFieldName
public FieldLevelEncryptionConfigBuilder withEncryptedKeyFieldName(String encryptedKeyFieldName)
-
withEncryptedValueFieldName
public FieldLevelEncryptionConfigBuilder withEncryptedValueFieldName(String encryptedValueFieldName)
-
withEncryptionCertificateFingerprintFieldName
public FieldLevelEncryptionConfigBuilder withEncryptionCertificateFingerprintFieldName(String encryptionCertificateFingerprintFieldName)
-
withEncryptionKeyFingerprintFieldName
public FieldLevelEncryptionConfigBuilder withEncryptionKeyFingerprintFieldName(String encryptionKeyFingerprintFieldName)
-
withFieldValueEncoding
public FieldLevelEncryptionConfigBuilder withFieldValueEncoding(FieldLevelEncryptionConfig.FieldValueEncoding fieldValueEncoding)
-
withIvHeaderName
public FieldLevelEncryptionConfigBuilder withIvHeaderName(String ivHeaderName)
-
withOaepPaddingDigestAlgorithmHeaderName
public FieldLevelEncryptionConfigBuilder withOaepPaddingDigestAlgorithmHeaderName(String oaepPaddingDigestAlgorithmHeaderName)
-
withEncryptedKeyHeaderName
public FieldLevelEncryptionConfigBuilder withEncryptedKeyHeaderName(String encryptedKeyHeaderName)
-
withEncryptionCertificateFingerprintHeaderName
public FieldLevelEncryptionConfigBuilder withEncryptionCertificateFingerprintHeaderName(String encryptionCertificateFingerprintHeaderName)
-
withEncryptionKeyFingerprintHeaderName
public FieldLevelEncryptionConfigBuilder withEncryptionKeyFingerprintHeaderName(String encryptionKeyFingerprintHeaderName)
-
withEncryptionIVSize
public FieldLevelEncryptionConfigBuilder withEncryptionIVSize(Integer ivSize)
See:EncryptionConfig.ivSize
.
-
build
public FieldLevelEncryptionConfig build() throws EncryptionException
Build aFieldLevelEncryptionConfig
.- Throws:
EncryptionException
-
-