Lines Matching defs:ofs_hmac
382 * @ofs_hmac: the offset in the node where the HMAC is inserted
390 int len, int ofs_hmac, void *hmac)
396 ubifs_assert(c, ofs_hmac > 8);
397 ubifs_assert(c, ofs_hmac + hmac_len < len);
406 err = crypto_shash_update(shash, node + 8, ofs_hmac - 8);
411 if (len - ofs_hmac - hmac_len > 0) {
412 err = crypto_shash_update(shash, node + ofs_hmac + hmac_len,
413 len - ofs_hmac - hmac_len);
426 * @ofs_hmac: the offset in the node where the HMAC is inserted
428 * This function inserts a HMAC at offset @ofs_hmac into the node given in
434 int ofs_hmac)
436 return ubifs_node_calc_hmac(c, node, len, ofs_hmac, node + ofs_hmac);
444 * @ofs_hmac: the offset in the node where the HMAC is inserted
446 * This function verifies the HMAC at offset @ofs_hmac of the node given in
450 int len, int ofs_hmac)
460 err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac);
466 err = crypto_memneq(hmac, node + ofs_hmac, hmac_len);