crypto: ahash - Add crypto_ahash_set_reqsize
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 12 Jul 2009 15:05:48 +0000 (23:05 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 14 Jul 2009 04:58:11 +0000 (12:58 +0800)
This patch adds the helper crypto_ahash_set_reqsize so that
implementations do not directly access the crypto_ahash structure.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/crypto/internal/hash.h

index 6e283495374e14d8e1c2950a8911637db80bc0a5..5e45818f335147c765a77bcc07c6dd11ed1ab14b 100644 (file)
@@ -77,6 +77,12 @@ static inline struct ahash_alg *crypto_ahash_alg(
        return &crypto_ahash_tfm(tfm)->__crt_alg->cra_ahash;
 }
 
+static inline void crypto_ahash_set_reqsize(struct crypto_ahash *tfm,
+                                           unsigned int reqsize)
+{
+       crypto_ahash_crt(tfm)->reqsize = reqsize;
+}
+
 static inline int ahash_enqueue_request(struct crypto_queue *queue,
                                             struct ahash_request *request)
 {