MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / hex_encode_prefix

Function hex_encode_prefix

crates/openshell-bootstrap/src/jwt.rs:65–72  ·  view source on GitHub ↗
(bytes: &[u8], n: usize)

Source from the content-addressed store, hash-verified

63}
64
65fn hex_encode_prefix(bytes: &[u8], n: usize) -> String {
66 use std::fmt::Write as _;
67 let mut out = String::with_capacity(n * 2);
68 for byte in bytes.iter().take(n) {
69 let _ = write!(out, "{byte:02x}");
70 }
71 out
72}
73
74#[cfg(test)]
75mod tests {

Callers 1

kid_from_public_key_derFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected