Skip to content

Commit d6effab

Browse files
CodingAnarchyclaude
andcommitted
docs: Add comprehensive doc tests and update encryption documentation
- Added comprehensive doc tests to KeyManager::new() method with PostgreSQL and MySQL examples - Added doc tests to KeyManager::generate_key() method with different key types and patterns - Added doc tests to KeyManager::get_key() method with error handling examples - Added doc tests to KeyManager::rotate_key() method with rotation workflow examples - Added doc tests to all KeyManagerConfig builder methods with practical examples - Added comprehensive key rotation workflow example to module-level documentation - Updated outdated documentation references and removed obsolete rotate_key_if_needed references - Fixed broken code block in module documentation - All documentation now compiles correctly with proper feature guards 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent f6d9656 commit d6effab

File tree

2 files changed

+437
-25
lines changed

2 files changed

+437
-25
lines changed

src/encryption/engine.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -535,30 +535,6 @@ where
535535
})
536536
}
537537

538-
/// Rotates the encryption key according to the configuration.
539-
///
540-
/// If key rotation is enabled, this method will generate a new key
541-
/// and update the key store. Old keys are retained for decryption
542-
/// of existing encrypted data.
543-
///
544-
/// # Returns
545-
///
546-
/// The new key identifier if rotation was performed.
547-
///
548-
/// # Examples
549-
///
550-
/// ```rust,no_run
551-
/// # #[cfg(feature = "encryption")]
552-
/// # {
553-
/// # async fn example(mut engine: hammerwork::encryption::EncryptionEngine) -> Result<(), Box<dyn std::error::Error>> {
554-
/// if let Some(new_key_id) = engine.rotate_key_if_needed().await? {
555-
/// println!("Key rotated to: {}", new_key_id);
556-
/// }
557-
/// # Ok(())
558-
/// # }
559-
/// # }
560-
/// ```
561-
562538
/// Sets the key manager for the encryption engine.
563539
///
564540
/// This enables the engine to use proper key metadata for rotation decisions

0 commit comments

Comments
 (0)