Lines Matching refs:len
508 u32 datalen = field_data[i].len; in ima_calc_field_array_hash_tfm()
553 static int calc_buffer_ahash_atfm(const void *buf, loff_t len, in calc_buffer_ahash_atfm() argument
577 sg_init_one(&sg, buf, len); in calc_buffer_ahash_atfm()
578 ahash_request_set_crypt(req, &sg, NULL, len); in calc_buffer_ahash_atfm()
593 static int calc_buffer_ahash(const void *buf, loff_t len, in calc_buffer_ahash() argument
603 rc = calc_buffer_ahash_atfm(buf, len, hash, tfm); in calc_buffer_ahash()
615 unsigned int len; in calc_buffer_shash_tfm() local
628 len = size < PAGE_SIZE ? size : PAGE_SIZE; in calc_buffer_shash_tfm()
629 rc = crypto_shash_update(shash, buf, len); in calc_buffer_shash_tfm()
632 buf += len; in calc_buffer_shash_tfm()
633 size -= len; in calc_buffer_shash_tfm()
641 static int calc_buffer_shash(const void *buf, loff_t len, in calc_buffer_shash() argument
651 rc = calc_buffer_shash_tfm(buf, len, hash, tfm); in calc_buffer_shash()
657 int ima_calc_buffer_hash(const void *buf, loff_t len, in ima_calc_buffer_hash() argument
662 if (ima_ahash_minsize && len >= ima_ahash_minsize) { in ima_calc_buffer_hash()
663 rc = calc_buffer_ahash(buf, len, hash); in ima_calc_buffer_hash()
668 return calc_buffer_shash(buf, len, hash); in ima_calc_buffer_hash()