Class JweConfigBuilder
- java.lang.Object
-
- com.mastercard.developer.encryption.JweConfigBuilder
-
public class JweConfigBuilder extends Object
-
-
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 JweConfigBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JweConfigBuilder
aJweEncryptionConfig()
Get an instance of the builder.JweConfig
build()
Build aJweConfig
.JweConfigBuilder
withDecryptionKey(PrivateKey decryptionKey)
JweConfigBuilder
withDecryptionPath(String jsonPathIn, String jsonPathOut)
JweConfigBuilder
withEncryptedValueFieldName(String encryptedValueFieldName)
JweConfigBuilder
withEncryptionCertificate(Certificate encryptionCertificate)
JweConfigBuilder
withEncryptionIVSize(Integer ivSize)
See:EncryptionConfig.ivSize
.JweConfigBuilder
withEncryptionKey(PublicKey encryptionKey)
JweConfigBuilder
withEncryptionKeyFingerprint(String encryptionKeyFingerprint)
JweConfigBuilder
withEncryptionPath(String jsonPathIn, String jsonPathOut)
-
-
-
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
-
aJweEncryptionConfig
public static JweConfigBuilder aJweEncryptionConfig()
Get an instance of the builder.
-
build
public JweConfig build() throws EncryptionException
Build aJweConfig
.- Throws:
EncryptionException
-
withEncryptionCertificate
public JweConfigBuilder withEncryptionCertificate(Certificate encryptionCertificate)
-
withEncryptionKey
public JweConfigBuilder withEncryptionKey(PublicKey encryptionKey)
-
withDecryptionKey
public JweConfigBuilder withDecryptionKey(PrivateKey decryptionKey)
-
withEncryptionPath
public JweConfigBuilder withEncryptionPath(String jsonPathIn, String jsonPathOut)
-
withDecryptionPath
public JweConfigBuilder withDecryptionPath(String jsonPathIn, String jsonPathOut)
-
withEncryptedValueFieldName
public JweConfigBuilder withEncryptedValueFieldName(String encryptedValueFieldName)
-
withEncryptionKeyFingerprint
public JweConfigBuilder withEncryptionKeyFingerprint(String encryptionKeyFingerprint)
-
withEncryptionIVSize
public JweConfigBuilder withEncryptionIVSize(Integer ivSize)
See:EncryptionConfig.ivSize
.
-
-