mirror of
https://github.com/kristoferssolo/cipher-workshop.git
synced 2026-03-22 00:26:19 +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,7 +1,21 @@
|
||||
//! DES (Data Encryption Standard) implementation.
|
||||
//!
|
||||
//! Provides the classic DES block cipher with 64-bit keys and blocks.
|
||||
//! Uses 16 Feistel rounds with 48-bit subkeys.
|
||||
//!
|
||||
//! # Example
|
||||
//! ```
|
||||
//! use des::Des;
|
||||
//! use cipher_core::BlockCipher;
|
||||
//!
|
||||
//! let cipher = Des::new(0x133457799BBCDFF1_u64);
|
||||
//! let ciphertext = cipher.encrypt(&[0u8; 8]).unwrap();
|
||||
//! ```
|
||||
|
||||
mod block;
|
||||
pub mod constants;
|
||||
mod des;
|
||||
mod key;
|
||||
pub mod utils;
|
||||
|
||||
pub use {block::Block64, des::Des};
|
||||
pub use {block::Block64, block::LR, des::Des};
|
||||
|
||||
Reference in New Issue
Block a user