diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-19 03:37:41 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-20 16:10:48 +0200 |
commit | 524e56c31a6fe21e6f6f543360359e7a97dfabfb (patch) | |
tree | 62b4cbe0ae8b30fe033ce73f959254329556af21 /include/crypto/hash.h | |
parent | lib/mpi: fix off by one in mpi_read_raw_from_sgl (diff) | |
download | linux-524e56c31a6fe21e6f6f543360359e7a97dfabfb.tar.xz linux-524e56c31a6fe21e6f6f543360359e7a97dfabfb.zip |
crypto: ahash - Add crypto_ahash_blocksize
This patch adds the missing helper crypto_ahash_blocksize which
returns the block size of an ahash algorithm.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/hash.h')
-rw-r--r-- | include/crypto/hash.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/crypto/hash.h b/include/crypto/hash.h index 8e920b44c0ac..3d69c93d50e8 100644 --- a/include/crypto/hash.h +++ b/include/crypto/hash.h @@ -264,6 +264,20 @@ static inline unsigned int crypto_ahash_alignmask( return crypto_tfm_alg_alignmask(crypto_ahash_tfm(tfm)); } +/** + * crypto_ahash_blocksize() - obtain block size for cipher + * @tfm: cipher handle + * + * The block size for the message digest cipher referenced with the cipher + * handle is returned. + * + * Return: block size of cipher + */ +static inline unsigned int crypto_ahash_blocksize(struct crypto_ahash *tfm) +{ + return crypto_tfm_alg_blocksize(crypto_ahash_tfm(tfm)); +} + static inline struct hash_alg_common *__crypto_hash_alg_common( struct crypto_alg *alg) { |