summaryrefslogtreecommitdiff
path: root/include/crypto/hash.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-07-14 12:50:12 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2009-07-14 12:58:00 +0800
commit113adefc73c291f93f875fe515a46d8f76252fff (patch)
treed8b71f64e7ed074ede921a1b2ba65d606367735e /include/crypto/hash.h
parentaef73cfcb913eae3d0deeb60eb385f75039db40b (diff)
downloadlinux-3.10-113adefc73c291f93f875fe515a46d8f76252fff.tar.gz
linux-3.10-113adefc73c291f93f875fe515a46d8f76252fff.tar.bz2
linux-3.10-113adefc73c291f93f875fe515a46d8f76252fff.zip
crypto: shash - Make descsize a run-time attribute
This patch changes descsize to a run-time attribute so that implementations can change it in their init functions. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/hash.h')
-rw-r--r--include/crypto/hash.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index f74214a4b01..fcc02d97823 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -48,6 +48,7 @@ struct crypto_ahash {
};
struct crypto_shash {
+ unsigned int descsize;
struct crypto_tfm base;
};
@@ -275,7 +276,7 @@ static inline void crypto_shash_clear_flags(struct crypto_shash *tfm, u32 flags)
static inline unsigned int crypto_shash_descsize(struct crypto_shash *tfm)
{
- return crypto_shash_alg(tfm)->descsize;
+ return tfm->descsize;
}
static inline void *shash_desc_ctx(struct shash_desc *desc)