Can upload files

This commit is contained in:
2025-04-09 21:12:47 +02:00
parent 84e1c57dc9
commit 61a4ea62c6
24 changed files with 342 additions and 61 deletions

View File

@ -0,0 +1,9 @@
use sha2::{Digest, Sha512};
/// Compute hash of a slice of bytes (sha512)
pub fn sha512(bytes: &[u8]) -> String {
let mut hasher = Sha512::new();
hasher.update(bytes);
let h = hasher.finalize();
format!("{:x}", h)
}