Implement common traits

This commit is contained in:
daxpedda
2021-06-22 20:46:34 -07:00
committed by Kevin Lewi
parent 48590056ca
commit eb59676a94
9 changed files with 218 additions and 64 deletions
+3 -1
View File
@@ -61,7 +61,7 @@ fn recover_keys_internal<CS: CipherSuite>(
Ok(client_static_keypair)
}
#[derive(Clone, Copy, PartialEq, Zeroize)]
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq, Zeroize)]
#[zeroize(drop)]
pub(crate) enum InnerEnvelopeMode {
Zero = 0,
@@ -105,6 +105,8 @@ impl<CS: CipherSuite> Clone for Envelope<CS> {
}
}
impl_debug_eq_hash_for!(struct Envelope<CS: CipherSuite>, [mode, nonce, hmac]);
// Note that this struct represents an envelope that has been "opened" with the asssociated
// key. This key is also used to derive the export_key parameter, which is technically
// unrelated to the envelope's encrypted and authenticated contents.