mirror of
https://github.com/kristoferssolo/cipher-workshop.git
synced 2026-02-04 06:42:11 +00:00
docs(aes,des): add crate documentation and improve re-exports
Add crate-level doc comments with usage examples. Export additional
types for library users:
- aes: Block32 (32-bit word type)
- des: LR (Feistel round state)
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
//! AES (Advanced Encryption Standard) implementation.
|
||||
//!
|
||||
//! Provides AES-128 block cipher with 128-bit keys and blocks.
|
||||
//!
|
||||
//! # Example
|
||||
//! ```
|
||||
//! use aes::Aes;
|
||||
//! use cipher_core::BlockCipher;
|
||||
//!
|
||||
//! let cipher = Aes::new(0x2b7e1516_28aed2a6_abf71588_09cf4f3c_u128);
|
||||
//! let ciphertext = cipher.encrypt(&[0u8; 16]).unwrap();
|
||||
//! ```
|
||||
|
||||
mod aes;
|
||||
mod block;
|
||||
mod constants;
|
||||
@@ -5,4 +18,4 @@ mod key;
|
||||
mod operations;
|
||||
mod sbox;
|
||||
|
||||
pub use {aes::Aes, block::Block128};
|
||||
pub use {aes::Aes, block::Block128, block::Block32};
|
||||
|
||||
Reference in New Issue
Block a user