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

Function is_token_byte

crates/openshell-core/src/forward.rs:831–835  ·  view source on GitHub ↗
(b: u8)

Source from the content-addressed store, hash-verified

829}
830
831fn is_token_byte(b: u8) -> bool {
832 // URL-safe base64 + common token charset. No shell metacharacters, no
833 // whitespace, no control bytes.
834 b.is_ascii_alphanumeric() || matches!(b, b'.' | b'-' | b'_' | b'~' | b'+' | b'/' | b'=')
835}
836
837fn is_gateway_host_byte(b: u8) -> bool {
838 // DNS hostname (alphanumeric + `.-`), IPv4, or bracketed IPv6 (`[::1]`).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected