Commit e1c36084 authored by Eric Biggers's avatar Eric Biggers
Browse files

crypto: polyval - Rename conflicting functions



Rename polyval_init() and polyval_update(), in preparation for adding
library functions with the same name to <crypto/polyval.h>.

Note that polyval-generic.c will be removed later, as it will be
superseded by the library.  This commit just keeps the kernel building
for the initial introduction of the library.

Reviewed-by: default avatarArd Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20251109234726.638437-2-ebiggers@kernel.org


Signed-off-by: default avatarEric Biggers <ebiggers@kernel.org>
parent 8ba60c59
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -99,7 +99,7 @@ static int polyval_setkey(struct crypto_shash *tfm,
	return 0;
}

static int polyval_init(struct shash_desc *desc)
static int polyval_generic_init(struct shash_desc *desc)
{
	struct polyval_desc_ctx *dctx = shash_desc_ctx(desc);

@@ -108,7 +108,7 @@ static int polyval_init(struct shash_desc *desc)
	return 0;
}

static int polyval_update(struct shash_desc *desc,
static int polyval_generic_update(struct shash_desc *desc,
				  const u8 *src, unsigned int srclen)
{
	struct polyval_desc_ctx *dctx = shash_desc_ctx(desc);
@@ -135,7 +135,7 @@ static int polyval_finup(struct shash_desc *desc, const u8 *src,
		u8 tmp[POLYVAL_BLOCK_SIZE] = {};

		memcpy(tmp, src, len);
		polyval_update(desc, tmp, POLYVAL_BLOCK_SIZE);
		polyval_generic_update(desc, tmp, POLYVAL_BLOCK_SIZE);
	}
	copy_and_reverse(dst, dctx->buffer);
	return 0;
@@ -166,8 +166,8 @@ static void polyval_exit_tfm(struct crypto_shash *tfm)

static struct shash_alg polyval_alg = {
	.digestsize	= POLYVAL_DIGEST_SIZE,
	.init		= polyval_init,
	.update		= polyval_update,
	.init		= polyval_generic_init,
	.update		= polyval_generic_update,
	.finup		= polyval_finup,
	.setkey		= polyval_setkey,
	.export		= polyval_export,