Solve some clippy stuffs (#6247)

This commit is contained in:
Thomas Coratger
2024-01-26 18:13:58 +01:00
committed by GitHub
parent 3043244db0
commit 039a696966
6 changed files with 23 additions and 8 deletions

View File

@ -1,4 +1,13 @@
#![allow(missing_docs)]
//! # Ethereum MAC Module
//!
//! This module provides the implementation of the Ethereum MAC (Message Authentication Code)
//! construction, as specified in the Ethereum RLPx protocol.
//!
//! The Ethereum MAC is a nonstandard MAC construction that utilizes AES-256 (as a block cipher)
//! and Keccak-256. It is specifically designed for messages of 128 bits in length and is not
//! intended for general MAC use.
//!
//! For more information, refer to the [Ethereum MAC specification](https://github.com/ethereum/devp2p/blob/master/rlpx.md#mac).
use aes::Aes256Enc;
use block_padding::NoPadding;
@ -9,6 +18,11 @@ use reth_primitives::{B128, B256};
use sha3::{Digest, Keccak256};
use typenum::U16;
/// Type alias for a fixed-size array of 16 bytes used as headers.
///
/// This type is defined as [`GenericArray<u8, U16>`] and is commonly employed in Ethereum RLPx
/// protocol-related structures for headers. It represents 16 bytes of data used in various
/// cryptographic operations, such as MAC (Message Authentication Code) computation.
pub type HeaderBytes = GenericArray<u8, U16>;
/// [`Ethereum MAC`](https://github.com/ethereum/devp2p/blob/master/rlpx.md#mac) state.