mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
crypto: hash - Add statesize to crypto_ahash
As ahash drivers may need to use fallbacks, their state size is thus variable. Deal with this by making it an attribute of crypto_ahash. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -260,6 +260,7 @@ struct crypto_ahash {
|
||||
int (*setkey)(struct crypto_ahash *tfm, const u8 *key,
|
||||
unsigned int keylen);
|
||||
|
||||
unsigned int statesize;
|
||||
unsigned int reqsize;
|
||||
struct crypto_tfm base;
|
||||
};
|
||||
@@ -400,7 +401,7 @@ static inline unsigned int crypto_ahash_digestsize(struct crypto_ahash *tfm)
|
||||
*/
|
||||
static inline unsigned int crypto_ahash_statesize(struct crypto_ahash *tfm)
|
||||
{
|
||||
return crypto_hash_alg_common(tfm)->statesize;
|
||||
return tfm->statesize;
|
||||
}
|
||||
|
||||
static inline u32 crypto_ahash_get_flags(struct crypto_ahash *tfm)
|
||||
|
||||
Reference in New Issue
Block a user