INNER CODE UNIT · Rust

write_startup_ready_record_to

AChep/keyguard-app · commonAgent/src/lib.rs:37

pub fn write_startup_ready_record_to(mut writer: impl std::io::Write) -> std::io::Result<()> {
    writer.write_all(STARTUP_READY_RECORD)?;
    writer.flush()
}

const SUBJECT_FINGERPRINT_DOMAIN: &[u8] = b"keyguard-agent-subject-v2\0";
const CONTEXT_FINGERPRINT_DOMAIN: &[u8] = b"keyguard-agent-context-v2\0";

/// An opaque, fixed-size identifier used to scope an approval to one public
/// agent connection.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub struct ConnectionPrincipal([u8; PRINCIPAL_FINGERPRINT_LEN]);

/// Explicit name for the live connection fingerprint.
pub type ConnectionFingerprint = ConnectionPrincipal;

impl ConnectionPrincipal {
    /// Generates a fresh connection principal from the operating system CSPRNG.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…