Files
MoneyMgr/moneymgr_backend/src/utils/crypt_utils.rs
Pierre HUBERT fb46626cff
Some checks failed
continuous-integration/drone/push Build is failing
Update project dependencies
2025-05-15 21:45:36 +02:00

10 lines
259 B
Rust

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();
base16ct::lower::encode_string(h.as_slice())
}