pub fn compute_verity<H: FsVerityHashValue>(data: &[u8]) -> HExpand description
Compute the fs-verity digest for a given block of data, in userspace.
The fs-verity digest is a cryptographic hash over the fs-verity descriptor, which itself contains the root hash of a Merkle tree with an arity determined by the chosen block size and the output size of the chosen hash algorithm.
It’s possible to choose the hash algorithm (via the generic parameter) but the blocksize is currently hardcoded to 4096. Salt is not supported.
See https://www.kernel.org/doc/html/latest/filesystems/fsverity.html#file-digest-computation
§Arguments:
data: the data to hash