Lines Matching refs:hash

330 				   struct ima_digest_data *hash,  in ima_calc_file_hash_atfm()  argument
341 hash->length = crypto_ahash_digestsize(tfm); in ima_calc_file_hash_atfm()
432 ahash_request_set_crypt(req, NULL, hash->digest, 0); in ima_calc_file_hash_atfm()
440 static int ima_calc_file_ahash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_ahash() argument
445 tfm = ima_alloc_atfm(hash->algo); in ima_calc_file_ahash()
449 rc = ima_calc_file_hash_atfm(file, hash, tfm); in ima_calc_file_ahash()
457 struct ima_digest_data *hash, in ima_calc_file_hash_tfm() argument
467 hash->length = crypto_shash_digestsize(tfm); in ima_calc_file_hash_tfm()
503 rc = crypto_shash_final(shash, hash->digest); in ima_calc_file_hash_tfm()
507 static int ima_calc_file_shash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_shash() argument
512 tfm = ima_alloc_tfm(hash->algo); in ima_calc_file_shash()
516 rc = ima_calc_file_hash_tfm(file, hash, tfm); in ima_calc_file_shash()
536 int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash) in ima_calc_file_hash() argument
548 hash->length = hash_digest_size[ima_hash_algo]; in ima_calc_file_hash()
549 hash->algo = ima_hash_algo; in ima_calc_file_hash()
568 rc = ima_calc_file_ahash(f, hash); in ima_calc_file_hash()
573 rc = ima_calc_file_shash(f, hash); in ima_calc_file_hash()
664 struct ima_digest_data *hash, in calc_buffer_ahash_atfm() argument
672 hash->length = crypto_ahash_digestsize(tfm); in calc_buffer_ahash_atfm()
695 ahash_request_set_crypt(req, NULL, hash->digest, 0); in calc_buffer_ahash_atfm()
704 struct ima_digest_data *hash) in calc_buffer_ahash() argument
709 tfm = ima_alloc_atfm(hash->algo); in calc_buffer_ahash()
713 rc = calc_buffer_ahash_atfm(buf, len, hash, tfm); in calc_buffer_ahash()
721 struct ima_digest_data *hash, in calc_buffer_shash_tfm() argument
730 hash->length = crypto_shash_digestsize(tfm); in calc_buffer_shash_tfm()
746 rc = crypto_shash_final(shash, hash->digest); in calc_buffer_shash_tfm()
751 struct ima_digest_data *hash) in calc_buffer_shash() argument
756 tfm = ima_alloc_tfm(hash->algo); in calc_buffer_shash()
760 rc = calc_buffer_shash_tfm(buf, len, hash, tfm); in calc_buffer_shash()
767 struct ima_digest_data *hash) in ima_calc_buffer_hash() argument
772 rc = calc_buffer_ahash(buf, len, hash); in ima_calc_buffer_hash()
777 return calc_buffer_shash(buf, len, hash); in ima_calc_buffer_hash()
844 int ima_calc_boot_aggregate(struct ima_digest_data *hash) in ima_calc_boot_aggregate() argument
852 if (crypto_id == hash->algo) { in ima_calc_boot_aggregate()
869 hash->algo = ima_tpm_chip->allocated_banks[bank_idx].crypto_id; in ima_calc_boot_aggregate()
871 tfm = ima_alloc_tfm(hash->algo); in ima_calc_boot_aggregate()
875 hash->length = crypto_shash_digestsize(tfm); in ima_calc_boot_aggregate()
877 rc = ima_calc_boot_aggregate_tfm(hash->digest, alg_id, tfm); in ima_calc_boot_aggregate()