Lines Matching defs:ofs_hmac
380 * @ofs_hmac: the offset in the node where the HMAC is inserted
388 int len, int ofs_hmac, void *hmac)
394 ubifs_assert(c, ofs_hmac > 8);
395 ubifs_assert(c, ofs_hmac + hmac_len < len);
404 err = crypto_shash_update(shash, node + 8, ofs_hmac - 8);
409 if (len - ofs_hmac - hmac_len > 0) {
410 err = crypto_shash_update(shash, node + ofs_hmac + hmac_len,
411 len - ofs_hmac - hmac_len);
424 * @ofs_hmac: the offset in the node where the HMAC is inserted
426 * This function inserts a HMAC at offset @ofs_hmac into the node given in
432 int ofs_hmac)
434 return ubifs_node_calc_hmac(c, node, len, ofs_hmac, node + ofs_hmac);
442 * @ofs_hmac: the offset in the node where the HMAC is inserted
444 * This function verifies the HMAC at offset @ofs_hmac of the node given in
448 int len, int ofs_hmac)
458 err = ubifs_node_calc_hmac(c, node, len, ofs_hmac, hmac);
464 err = crypto_memneq(hmac, node + ofs_hmac, hmac_len);