diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2022-01-10 16:22:32 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2022-01-10 16:22:32 +0100 |
commit | e98b5048c77e0ae8a5ad9841909adb617c434bac (patch) | |
tree | 755e074b42ce934132c47a9da47fbff2f6b7199a | |
parent | 4098dbaa63010f35cf36909eb364938f4faa9d79 (diff) |
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.
-rw-r--r-- | openpgp/src/crypto/aead.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<W: io::Write> Encryptor<W> { } // 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])?; |