/* Setting the seed allows arbitrary accumulators and flexible XOR policy If your algorithm starts with ~0, then XOR with ~0 before you set the seed.  */
static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int keylen)
/* Setting the seed allows arbitrary accumulators and flexible XOR policy If your algorithm starts with ~0, then XOR with ~0 before you set the seed.  */
static int chksum_setkey(struct crypto_shash *tfm, const u8 *key, unsigned int keylen)
{
	struct chksum_ctx *mctx = crypto_shash_ctx(tfm);
	if (keylen != sizeof(mctx->key)) {
		crypto_shash_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
		return -EINVAL;
	}
	mctx->key = le32_to_cpu(*(__le32 *)key);
	return 0;
}