Lines Matching refs:hash
205 struct ima_digest_data *hash, in ima_calc_file_hash_atfm() argument
216 hash->length = crypto_ahash_digestsize(tfm); in ima_calc_file_hash_atfm()
307 ahash_request_set_crypt(req, NULL, hash->digest, 0); in ima_calc_file_hash_atfm()
315 static int ima_calc_file_ahash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_ahash() argument
320 tfm = ima_alloc_atfm(hash->algo); in ima_calc_file_ahash()
324 rc = ima_calc_file_hash_atfm(file, hash, tfm); in ima_calc_file_ahash()
332 struct ima_digest_data *hash, in ima_calc_file_hash_tfm() argument
342 hash->length = crypto_shash_digestsize(tfm); in ima_calc_file_hash_tfm()
376 rc = crypto_shash_final(shash, hash->digest); in ima_calc_file_hash_tfm()
380 static int ima_calc_file_shash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_shash() argument
385 tfm = ima_alloc_tfm(hash->algo); in ima_calc_file_shash()
389 rc = ima_calc_file_hash_tfm(file, hash, tfm); in ima_calc_file_shash()
409 int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_hash() argument
421 hash->length = hash_digest_size[ima_hash_algo]; in ima_calc_file_hash()
422 hash->algo = ima_hash_algo; in ima_calc_file_hash()
449 rc = ima_calc_file_ahash(f, hash); in ima_calc_file_hash()
454 rc = ima_calc_file_shash(f, hash); in ima_calc_file_hash()
469 struct ima_digest_data *hash, in ima_calc_field_array_hash_tfm() argument
477 hash->length = crypto_shash_digestsize(tfm); in ima_calc_field_array_hash_tfm()
507 rc = crypto_shash_final(shash, hash->digest); in ima_calc_field_array_hash_tfm()
514 struct ima_digest_data *hash) in ima_calc_field_array_hash() argument
519 tfm = ima_alloc_tfm(hash->algo); in ima_calc_field_array_hash()
524 hash, tfm); in ima_calc_field_array_hash()
532 struct ima_digest_data *hash, in calc_buffer_ahash_atfm() argument
540 hash->length = crypto_ahash_digestsize(tfm); in calc_buffer_ahash_atfm()
563 ahash_request_set_crypt(req, NULL, hash->digest, 0); in calc_buffer_ahash_atfm()
572 struct ima_digest_data *hash) in calc_buffer_ahash() argument
577 tfm = ima_alloc_atfm(hash->algo); in calc_buffer_ahash()
581 rc = calc_buffer_ahash_atfm(buf, len, hash, tfm); in calc_buffer_ahash()
589 struct ima_digest_data *hash, in calc_buffer_shash_tfm() argument
598 hash->length = crypto_shash_digestsize(tfm); in calc_buffer_shash_tfm()
614 rc = crypto_shash_final(shash, hash->digest); in calc_buffer_shash_tfm()
619 struct ima_digest_data *hash) in calc_buffer_shash() argument
624 tfm = ima_alloc_tfm(hash->algo); in calc_buffer_shash()
628 rc = calc_buffer_shash_tfm(buf, len, hash, tfm); in calc_buffer_shash()
635 struct ima_digest_data *hash) in ima_calc_buffer_hash() argument
640 rc = calc_buffer_ahash(buf, len, hash); in ima_calc_buffer_hash()
645 return calc_buffer_shash(buf, len, hash); in ima_calc_buffer_hash()
685 int __init ima_calc_boot_aggregate(struct ima_digest_data *hash) in ima_calc_boot_aggregate() argument
690 tfm = ima_alloc_tfm(hash->algo); in ima_calc_boot_aggregate()
694 hash->length = crypto_shash_digestsize(tfm); in ima_calc_boot_aggregate()
695 rc = ima_calc_boot_aggregate_tfm(hash->digest, tfm); in ima_calc_boot_aggregate()