Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmux-tui/crates/acpmux/src/opaque_agent_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ impl Key {
let msg = format!("{}\0{harness}\0{session}", host.to_ascii_lowercase());
let mac = cmux_local_auth::frontend_proof::hmac_sha256(&self.0, msg.as_bytes());
let hex = cmux_local_auth::frontend_proof::hex(&mac);
format!("{PREFIX}{}", &hex[..HEX_LEN])
// `hex` is 64 ASCII digits, so the prefix always exists; `get` keeps the panic ratchet at zero.
format!("{PREFIX}{}", hex.get(..HEX_LEN).unwrap_or(&hex))
}
}

Expand Down
Loading