Skip to content

Commit

Permalink
aead: enable missing_debug_implementations lint and add Debug imp…
Browse files Browse the repository at this point in the history
…ls (#1411)
  • Loading branch information
newpavlov authored Nov 17, 2023
1 parent 43d620d commit 20ae48b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 7 additions & 1 deletion aead/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg"
)]
#![forbid(unsafe_code)]
#![warn(clippy::unwrap_used, missing_docs, rust_2018_idioms)]
#![warn(
clippy::unwrap_used,
missing_docs,
rust_2018_idioms,
missing_debug_implementations
)]

#[cfg(feature = "alloc")]
extern crate alloc;
Expand Down Expand Up @@ -472,6 +477,7 @@ impl<Alg: AeadInPlace> AeadMutInPlace for Alg {
/// If you don't care about AAD, you can pass a `&[u8]` as the payload to
/// `encrypt`/`decrypt` and it will automatically be coerced to this type.
#[cfg(feature = "alloc")]
#[derive(Debug)]
pub struct Payload<'msg, 'aad> {
/// Message to be encrypted/decrypted
pub msg: &'msg [u8],
Expand Down
3 changes: 3 additions & 0 deletions aead/src/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ macro_rules! impl_stream_object {
#[doc = "[Online Authenticated-Encryption and its Nonce-Reuse Misuse-Resistance][1]."]
#[doc = ""]
#[doc = "[1]: https://eprint.iacr.org/2015/189.pdf"]
#[derive(Debug)]
pub struct $name<A, S>
where
A: AeadInPlace,
Expand Down Expand Up @@ -361,6 +362,7 @@ impl_stream_object!(
/// the last 5-bytes of the AEAD nonce.
///
/// [1]: https://eprint.iacr.org/2015/189.pdf
#[derive(Debug)]
pub struct StreamBE32<A>
where
A: AeadInPlace,
Expand Down Expand Up @@ -450,6 +452,7 @@ where
/// when interpreted as a 32-bit integer.
///
/// The 31-bit + 1-bit value is stored as the last 4 bytes of the AEAD nonce.
#[derive(Debug)]
pub struct StreamLE31<A>
where
A: AeadInPlace,
Expand Down

0 comments on commit 20ae48b

Please sign in to comment.