Lines Matching full:hash

3  * fs-verity hash algorithms
10 #include <crypto/hash.h>
12 /* The hash algorithms supported by fs-verity */
31 * fsverity_get_hash_alg() - validate and prepare a hash algorithm
33 * @num: the hash algorithm number
35 * Get the struct fsverity_hash_alg for the given hash algorithm number, and
36 * ensure it has a hash transform ready to go. The hash transforms are
40 * Return: pointer to the hash alg on success, else an ERR_PTR()
51 fsverity_warn(inode, "Unknown hash algorithm number: %u", num); in fsverity_get_hash_alg()
69 "Missing crypto API support for hash algorithm \"%s\"", in fsverity_get_hash_alg()
75 "Error allocating hash algorithm \"%s\": %ld", in fsverity_get_hash_alg()
103 * fsverity_prepare_hash_state() - precompute the initial hash state
104 * @alg: hash algorithm
109 * initial hash state on success or an ERR_PTR() on failure.
130 * Zero-pad the salt to the next multiple of the input size of the hash in fsverity_prepare_hash_state()
132 * bytes for SHA-512. This ensures that the hash algorithm won't have in fsverity_prepare_hash_state()
165 * fsverity_hash_block() - hash a single data or hash block
168 * @data: virtual address of a buffer containing the block to hash
171 * Hash a single data or hash block. The hash is salted if a salt is specified
188 "Error %d importing hash state", err); in fsverity_hash_block()
196 fsverity_err(inode, "Error %d computing block hash", err); in fsverity_hash_block()
201 * fsverity_hash_buffer() - hash some data
202 * @alg: the hash algorithm to use
203 * @data: the data to hash
204 * @size: size of data to hash, in bytes
220 * Sanity check the hash algorithms (could be a build-time check, but in fsverity_check_hash_algs()