Skip to main content

sha256_hex

Function sha256_hex 

Source
pub fn sha256_hex(data: &[u8]) -> String
Expand description

Computes SHA-256 hash of data and returns it as a hex string.

ยงExample

use alimentar::format::sha256_hex;

let hash = sha256_hex(b"Hello, World!");
assert_eq!(hash.len(), 64); // 256 bits = 32 bytes = 64 hex chars