File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
src/main/java/com/mastercard/developer/encryption Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -29,16 +29,14 @@ void computeEncryptionKeyFingerprintWhenNeeded() throws EncryptionException {
2929 // No encryption certificate / encryption key set or key fingerprint already provided
3030 return ;
3131 }
32- final PublicKey publicKey ;
3332 if (encryptionKey != null && encryptionCertificate != null ) {
3433 throw new IllegalArgumentException ("You can only supply either an encryption key or an encryption certificate" );
3534 }
35+ final PublicKey publicKey ;
3636 if (encryptionKey != null ) {
3737 publicKey = encryptionKey ;
38- } else if (encryptionCertificate != null ) {
39- publicKey = encryptionCertificate .getPublicKey ();
4038 } else {
41- throw new IllegalArgumentException ( "You need to supply either one of the encryption key or the encryption certificate" );
39+ publicKey = encryptionCertificate . getPublicKey ( );
4240 }
4341 byte [] keyFingerprintBytes = sha256digestBytes (publicKey .getEncoded ());
4442 encryptionKeyFingerprint = encodeBytes (keyFingerprintBytes , FieldLevelEncryptionConfig .FieldValueEncoding .HEX );
You can’t perform that action at this time.
0 commit comments