feat: harden community production foundation through story 1.5

This commit is contained in:
bsodfather committed 2026-08-14 00:21:59 +03:00
1 parent c30461cc92
commit f6fc2e5c9b
161 files changed
+16758 -2515

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
use sha2::{Digest, Sha256};
pub(crate) fn sha256_hex(parts: impl IntoIterator<Item = String>) -> String {
let mut hasher = Sha256::new();
hasher.update(b"crank-config-fingerprint-v1\0");
for part in parts {
hasher.update(part.len().to_le_bytes());
hasher.update(part.as_bytes());
}
format!("{:x}", hasher.finalize())
}