feat: add api key verification

This commit is contained in:
2026-05-07 14:13:29 +02:00
parent 752373c7b7
commit 4b428ec32a
9 changed files with 209 additions and 92 deletions
+11
View File
@@ -0,0 +1,11 @@
use sha2::{Digest, Sha256};
pub fn hash_key(key: &str) -> String {
let mut hasher = Sha256::new();
hasher.update(key.as_bytes());
hasher
.finalize()
.iter()
.map(|b| format!("{:02x}", b))
.collect()
}