From e98b5048c77e0ae8a5ad9841909adb617c434bac Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 10 Jan 2022 16:22:32 +0100 Subject: openpgp: Fix typo. - This only went unnoticed because we only hash and write the digest, and don't invoke the encrypt method (which would have panic'ed). No functional change. --- openpgp/src/crypto/aead.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openpgp/src/crypto/aead.rs b/openpgp/src/crypto/aead.rs index 5162d351..10941b17 100644 --- a/openpgp/src/crypto/aead.rs +++ b/openpgp/src/crypto/aead.rs @@ -735,7 +735,7 @@ impl Encryptor { } // Write final digest. - let mut aead = self.make_aead(CipherOp::Decrypt)?; + let mut aead = self.make_aead(CipherOp::Encrypt)?; self.hash_associated_data(&mut aead, true); aead.digest(&mut self.scratch[..self.digest_size]); inner.write_all(&self.scratch[..self.digest_size])?; -- cgit v1.2.3