Skip to content

Commit

Permalink
crypto: shash - Add crypto_shash_blocksize
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
herbertx committed Feb 18, 2009
1 parent d7992f4 commit 9749598
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/crypto/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9749598

Please sign in to comment.