From 26c804b2dd16056f10cc1365b35afd36e1f02fbf Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Sun, 13 Mar 2022 15:12:38 +0100 Subject: [PATCH] Add comment about hash algorithm header --- .../java/org/pgpainless/encryption_signing/EncryptionStream.java | 1 + 1 file changed, 1 insertion(+) diff --git a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionStream.java b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionStream.java index 27b8958a..6fc112ba 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionStream.java +++ b/pgpainless-core/src/main/java/org/pgpainless/encryption_signing/EncryptionStream.java @@ -152,6 +152,7 @@ public final class EncryptionStream extends OutputStream { private void prepareLiteralDataProcessing() throws IOException { if (options.isCleartextSigned()) { + // Begin cleartext with hash algorithm of first signing method SigningOptions.SigningMethod firstMethod = options.getSigningOptions().getSigningMethods().values().iterator().next(); armorOutputStream.beginClearText(firstMethod.getHashAlgorithm().getAlgorithmId()); return;