keyhog-core 0.5.39

keyhog-core: shared data model and detector specifications for the KeyHog secret scanner
Documentation
1
2
3
4
5
6
7
8
9
//! Migrated from `src/credential.rs` inline tests.
use keyhog_core::Credential;
#[test]
fn debug_redacts_bytes() {
    let c = Credential::from_text(concat!("AK", "IAIOSFODNN7EXAMPLE"));
    let s = format!("{c:?}");
    assert!(s.contains("redacted"));
    assert!(!s.contains("AKIA"));
}