summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-02-03 12:47:44 +1100
committerHerbert Xu <herbert@gondor.apana.org.au>2009-02-18 16:48:06 +0800
commit9749598633efc2561224954217ff0d70aeed8b50 (patch)
treedd407e285f8b91209d693f5ffde6e17fe9f01b3b
parentd7992f42c61d5dc6d164f7dddd05284485204ada (diff)
downloadop-kernel-dev-9749598633efc2561224954217ff0d70aeed8b50.zip
op-kernel-dev-9749598633efc2561224954217ff0d70aeed8b50.tar.gz
crypto: shash - Add crypto_shash_blocksize
This function is needed by algorithms that don't know their own block size, e.g., in s390 where the code is common between multiple versions of SHA. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--include/crypto/hash.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index d797e11..d56bb71 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -231,6 +231,11 @@ static inline unsigned int crypto_shash_alignmask(
return crypto_tfm_alg_alignmask(crypto_shash_tfm(tfm));
}
+static inline unsigned int crypto_shash_blocksize(struct crypto_shash *tfm)
+{
+ return crypto_tfm_alg_blocksize(crypto_shash_tfm(tfm));
+}
+
static inline struct shash_alg *__crypto_shash_alg(struct crypto_alg *alg)
{
return container_of(alg, struct shash_alg, base);
OpenPOWER on IntegriCloud