Revision bd415b5c9552d44069d4e7c1e018b6d42f25af9e authored by Randy Dunlap on 08 May 2023, 05:59:28 UTC, committed by Jonathan Corbet on 16 May 2023, 18:55:35 UTC
Use the :Author: markup instead of making it a chapter heading.
This cleans up the table of contents for this file.

Fixes: 7f46a240b0a1 ("[PATCH] ramfs, rootfs, and initramfs docs")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Rob Landley <rob@landley.net>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230508055928.3548-1-rdunlap@infradead.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 7b38ecf
Raw File
hash.h
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Cryptographic API.
 *
 * Copyright (c) 2023 Herbert Xu <herbert@gondor.apana.org.au>
 */
#ifndef _LOCAL_CRYPTO_HASH_H
#define _LOCAL_CRYPTO_HASH_H

#include <crypto/internal/hash.h>
#include <linux/cryptouser.h>

#include "internal.h"

static inline int crypto_hash_report_stat(struct sk_buff *skb,
					  struct crypto_alg *alg,
					  const char *type)
{
	struct hash_alg_common *halg = __crypto_hash_alg_common(alg);
	struct crypto_istat_hash *istat = hash_get_stat(halg);
	struct crypto_stat_hash rhash;

	memset(&rhash, 0, sizeof(rhash));

	strscpy(rhash.type, type, sizeof(rhash.type));

	rhash.stat_hash_cnt = atomic64_read(&istat->hash_cnt);
	rhash.stat_hash_tlen = atomic64_read(&istat->hash_tlen);
	rhash.stat_err_cnt = atomic64_read(&istat->err_cnt);

	return nla_put(skb, CRYPTOCFGA_STAT_HASH, sizeof(rhash), &rhash);
}

int crypto_init_shash_ops_async(struct crypto_tfm *tfm);
struct crypto_ahash *crypto_clone_shash_ops_async(struct crypto_ahash *nhash,
						  struct crypto_ahash *hash);

int hash_prepare_alg(struct hash_alg_common *alg);

#endif	/* _LOCAL_CRYPTO_HASH_H */
back to top