pub fn sha256_bytes_hex(bytes: &[u8]) -> StringExpand description
Hex SHA-256 of arbitrary bytes: the same digest sha256_hex takes, for content that
is not necessarily text. A file the repository tracks may hold anything, and decoding it
to hash it would be a decision about its encoding that nothing here is entitled to make.
use majordomus_cli::policy::{sha256_bytes_hex, sha256_hex};
assert_eq!(sha256_bytes_hex(b"majordomus"), sha256_hex("majordomus"));
assert_ne!(sha256_bytes_hex(&[0xff, 0xfe]), sha256_bytes_hex(&[0xfe, 0xff]));