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

Function hash_path_id

crates/openshell-driver-vm/src/runtime.rs:1240–1247  ·  view source on GitHub ↗
(path: &Path)

Source from the content-addressed store, hash-verified

1238}
1239
1240fn hash_path_id(path: &Path) -> String {
1241 let mut hash: u64 = 0xcbf2_9ce4_8422_2325;
1242 for byte in path.to_string_lossy().as_bytes() {
1243 hash ^= u64::from(*byte);
1244 hash = hash.wrapping_mul(0x0100_0000_01b3);
1245 }
1246 format!("{:012x}", hash & 0x0000_ffff_ffff_ffff)
1247}
1248
1249fn secure_socket_base(subdir: &str) -> Result<PathBuf, String> {
1250 let base = std::env::var_os("XDG_RUNTIME_DIR").map_or_else(

Callers 1

gvproxy_socket_baseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected