Commit 524e56c3 authored by Herbert Xu's avatar Herbert Xu

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: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 63349d02
...@@ -264,6 +264,20 @@ static inline unsigned int crypto_ahash_alignmask( ...@@ -264,6 +264,20 @@ static inline unsigned int crypto_ahash_alignmask(
return crypto_tfm_alg_alignmask(crypto_ahash_tfm(tfm)); 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( static inline struct hash_alg_common *__crypto_hash_alg_common(
struct crypto_alg *alg) struct crypto_alg *alg)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment