/* * Copyright (C) 2014 Filipe David Borba Manana * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License v2 as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. */ #include #include #include "hash.h" static struct crypto_shash *tfm; int __init btrfs_hash_init(void) { tfm = crypto_alloc_shash("crc32c", 0, 0); return PTR_ERR_OR_ZERO(tfm); } const char* btrfs_crc32c_impl(void) { return crypto_tfm_alg_driver_name(crypto_shash_tfm(tfm)); } void btrfs_hash_exit(void) { crypto_free_shash(tfm); } u32 btrfs_crc32c(u32 crc, const void *address, unsigned int length) { SHASH_DESC_ON_STACK(shash, tfm); u32 *ctx = (u32 *)shash_desc_ctx(shash); int err; shash->tfm = tfm; shash->flags = 0; *ctx = crc; err = crypto_shash_update(shash, address, length); BUG_ON(err); return *ctx; } 'nds-private-remove'>nds-private-remove net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Valo <kvalo@codeaurora.org>2017-01-27 14:19:25 +0200
committerKalle Valo <kvalo@codeaurora.org>2017-01-28 09:15:50 +0200
commit2b1d530cb3157f828fcaadd259613f59db3c6d1c (patch)
treefb5dfe8f2e6956f54377c7275f330cd158ead259 /include/crypto/xts.h
parentbd19b5ab1da654de456e102250822ec06311d6ad (diff)
MAINTAINERS: ath9k-devel is closed
ath9k-devel list is now closed, only linux-wireless should be used. Reported-by: Michael Renzmann <mrenzmann@madwifi-project.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'include/crypto/xts.h')