]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
crypto: shash - Add crypto_shash_blocksize
authorHerbert Xu <herbert@gondor.apana.org.au>
Tue, 3 Feb 2009 01:47:44 +0000 (12:47 +1100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 18 Feb 2009 08:48:06 +0000 (16:48 +0800)
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>
include/crypto/hash.h

index d797e119e3d5e9677a60457670ed097982916691..d56bb71617c315e5cf13505f1ddc32c0cf698377 100644 (file)
@@ -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);