Class JweConfigBuilder
- java.lang.Object
-
- com.mastercard.developer.encryption.JweConfigBuilder
-
public class JweConfigBuilder extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected PrivateKeydecryptionKeyprotected Map<String,String>decryptionPathsprotected StringencryptedValueFieldNameprotected CertificateencryptionCertificateprotected PublicKeyencryptionKeyprotected StringencryptionKeyFingerprintprotected Map<String,String>encryptionPaths
-
Constructor Summary
Constructors Constructor Description JweConfigBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JweConfigBuilderaJweEncryptionConfig()Get an instance of the builder.JweConfigbuild()Build aJweConfig.JweConfigBuilderwithDecryptionKey(PrivateKey decryptionKey)JweConfigBuilderwithDecryptionPath(String jsonPathIn, String jsonPathOut)JweConfigBuilderwithEncryptedValueFieldName(String encryptedValueFieldName)JweConfigBuilderwithEncryptionCertificate(Certificate encryptionCertificate)JweConfigBuilderwithEncryptionKey(PublicKey encryptionKey)JweConfigBuilderwithEncryptionKeyFingerprint(String encryptionKeyFingerprint)JweConfigBuilderwithEncryptionPath(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
-
-
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)
-
-