Lines Matching refs:hash
89 * Calculate the hash of a template entry, add the template entry
129 * Violations are flagged in the measurement list with zero hash values.
175 * @allowed_algos: allowlist of hash algorithms for the IMA xattr
205 struct ima_max_digest_data *hash)
212 * hash containing 0's.
214 digest_len = fsverity_get_digest(iint->inode, hash->digest, NULL, &alg);
219 * Unlike in the case of actually calculating the file hash, in
220 * the fsverity case regardless of the hash algorithm, return
225 hash->hdr.algo = alg;
226 hash->hdr.length = digest_len;
233 * Calculate the file hash, if it doesn't already exist,
248 struct ima_max_digest_data hash;
276 hash.hdr.algo = algo;
277 hash.hdr.length = hash_digest_size[algo];
279 /* Initialize hash digest to 0's in case of failure */
280 memset(&hash.digest, 0, sizeof(hash.digest));
283 if (!ima_get_verity_digest(iint, &hash)) {
288 result = ima_calc_buffer_hash(buf, size, &hash.hdr);
290 result = ima_calc_file_hash(file, &hash.hdr);
296 length = sizeof(hash.hdr) + hash.hdr.length;
304 memcpy(iint->ima_hash, &hash, length);
389 char *hash;
396 hash = kzalloc((iint->ima_hash->length * 2) + 1, GFP_KERNEL);
397 if (!hash)
401 hex_byte_pack(hash + (i * 2), iint->ima_hash->digest[i]);
402 hash[i * 2] = '\0';
411 audit_log_format(ab, " hash=\"%s:%s\"", algo_name, hash);
418 kfree(hash);