cloudiful-redactor 0.2.9

Structured text redaction with reversible sessions for secrets, domains, URLs, and related sensitive values.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use anyhow::Result;

use crate::types::SessionSummary;

use super::crypto::parse_envelope;

pub fn inspect_encrypted_session(data: &str) -> Result<SessionSummary> {
    let envelope = parse_envelope(data)?;
    Ok(SessionSummary {
        version: envelope.version,
        session_id: envelope.session_id,
        fingerprint: envelope.fingerprint,
        redacted_fingerprint: envelope.redacted_fingerprint,
        entry_count: envelope.entry_count,
        entries: envelope.entries,
    })
}