summaryrefslogtreecommitdiffstats
path: root/include/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-07-12 17:05:48 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-14 06:58:11 +0200
commitfc00127fb67b2a7d2b66f0f4096a5367b581f045 (patch)
treee12e29519213eb16c3f9f3d800a2af9ae7c05b28 /include/crypto
parentcrypto: cryptd - Use shash algorithms (diff)
downloadlinux-fc00127fb67b2a7d2b66f0f4096a5367b581f045.tar.xz
linux-fc00127fb67b2a7d2b66f0f4096a5367b581f045.zip
crypto: ahash - Add crypto_ahash_set_reqsize
This patch adds the helper crypto_ahash_set_reqsize so that implementations do not directly access the crypto_ahash structure. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/internal/hash.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h
index 6e283495374e..5e45818f3351 100644
--- a/include/crypto/internal/hash.h
+++ b/include/crypto/internal/hash.h
@@ -77,6 +77,12 @@ static inline struct ahash_alg *crypto_ahash_alg(
return &crypto_ahash_tfm(tfm)->__crt_alg->cra_ahash;
}
+static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm,
+ unsigned int reqsize)
+{
+ crypto_ahash_crt(tfm)->reqsize = reqsize;
+}
+
static inline int ahash_enqueue_request(struct crypto_queue *queue,
struct ahash_request *request)
{