From 609bb4556aba7f005eba3226b2c5dc1aeb4c0d43 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Tue, 13 Sep 2022 20:26:13 +0200 Subject: [PATCH] Use ImplementationFactory.getSessionKeyDataDecryptorFactory() method --- .../decryption_verification/DecryptionStreamFactory.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStreamFactory.java b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStreamFactory.java index 77ad92bb..a787280a 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStreamFactory.java +++ b/pgpainless-core/src/main/java/org/pgpainless/decryption_verification/DecryptionStreamFactory.java @@ -256,9 +256,8 @@ public final class DecryptionStreamFactory { PGPEncryptedDataList pgpEncryptedDataList, SessionKey sessionKey) throws PGPException { - PGPSessionKey pgpSessionKey = new PGPSessionKey(sessionKey.getAlgorithm().getAlgorithmId(), sessionKey.getKey()); - SessionKeyDataDecryptorFactory decryptorFactory = - ImplementationFactory.getInstance().provideSessionKeyDataDecryptorFactory(pgpSessionKey); + SessionKeyDataDecryptorFactory decryptorFactory = ImplementationFactory.getInstance() + .getSessionKeyDataDecryptorFactory(sessionKey); InputStream decryptedDataStream = null; PGPEncryptedData encryptedData = null; for (PGPEncryptedData pgpEncryptedData : pgpEncryptedDataList) {