mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
crypto: ahash - Add crypto_ahash_tested() helper function
Add a little inline helper function crypto_ahash_tested() to the internal/hash.h header file to retrieve the tested status (that is the CRYPTO_ALG_TESTED bit in the cra_flags). Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Suggested-by: Herbert Xu <herbert@gondor.apana.org.au> Reviewed-by: Holger Dengler <dengler@linux.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
cbbc675506
commit
d0da164ba6
1 changed files with 7 additions and 0 deletions
|
@ -196,6 +196,13 @@ static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm,
|
|||
tfm->reqsize = reqsize;
|
||||
}
|
||||
|
||||
static inline bool crypto_ahash_tested(struct crypto_ahash *tfm)
|
||||
{
|
||||
struct crypto_tfm *tfm_base = crypto_ahash_tfm(tfm);
|
||||
|
||||
return tfm_base->__crt_alg->cra_flags & CRYPTO_ALG_TESTED;
|
||||
}
|
||||
|
||||
static inline void crypto_ahash_set_reqsize_dma(struct crypto_ahash *ahash,
|
||||
unsigned int reqsize)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue