Skip to content

Commit

Permalink
crypto: ahash - Add crypto_ahash_blocksize
Browse files Browse the repository at this point in the history
This patch adds the missing helper crypto_ahash_blocksize which
returns the block size of an ahash algorithm.

Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
herbertx committed Oct 20, 2015
1 parent 63349d0 commit 524e56c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions include/crypto/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 524e56c

Please sign in to comment.