Lines Matching defs:ofs_hmac
381 * @ofs_hmac: the offset in the node where the HMAC is inserted
389 int len, int ofs_hmac, void *hmac)
395 ubifs_assert(c, ofs_hmac > 8);
396 ubifs_assert(c, ofs_hmac + hmac_len < len);
405 err = crypto_shash_update(shash, node + 8, ofs_hmac - 8);
410 if (len - ofs_hmac - hmac_len > 0) {
411 err = crypto_shash_update(shash, node + ofs_hmac + hmac_len,
412 len - ofs_hmac - hmac_len);
425 * @ofs_hmac: the offset in the node where the HMAC is inserted
427 * This function inserts a HMAC at offset @ofs_hmac into the node given in
433 int ofs_hmac)
435 return ubifs_node_calc_hmac(c, node, len, ofs_hmac, node + ofs_hmac);
443 * @ofs_hmac: the offset in the node where the HMAC is inserted
445 * This function verifies the HMAC at offset @ofs_hmac of the node given in
449 int len, int ofs_hmac)
459 err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac);
465 err = crypto_memneq(hmac, node + ofs_hmac, hmac_len);