summaryrefslogtreecommitdiffstats
path: root/openpgp/src/crypto/backend/cng/aead.rs
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2020-11-17 07:04:01 +0100
committerAzul <azul@riseup.net>2020-11-24 12:24:36 +0100
commit43ad20c16ccee274cc4ecdb327e70e2349fa12ad (patch)
tree8f5a4ee4c08643a914fb519e609c987d57617a40 /openpgp/src/crypto/backend/cng/aead.rs
parent7fb0e9302b1145d959bdb81b064b453d21f49b3a (diff)
openpgp: seal Aead trait.
- Seal the Aead trait so it cannot be implemented outside the openpgp crate. - This way we can extend the trait without breaking the API compatibility. - See #538.
Diffstat (limited to 'openpgp/src/crypto/backend/cng/aead.rs')
-rw-r--r--openpgp/src/crypto/backend/cng/aead.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/crypto/backend/cng/aead.rs b/openpgp/src/crypto/backend/cng/aead.rs
index d0208221..d30073ca 100644
--- a/openpgp/src/crypto/backend/cng/aead.rs
+++ b/openpgp/src/crypto/backend/cng/aead.rs
@@ -2,6 +2,7 @@
use crate::{Error, Result};
use crate::crypto::aead::Aead;
+use crate::seal;
use crate::types::{AEADAlgorithm, SymmetricAlgorithm};
use super::symmetric::Ctr;
@@ -73,6 +74,7 @@ impl EaxAes {
}
+impl seal::Sealed for EaxAes {}
impl Aead for EaxAes {
/// Adds associated data `ad`.
fn update(&mut self, ad: &[u8]) {