crypto: shash - Add shash_instance_ctx
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jul 2009 03:32:55 +0000 (11:32 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 9 Jul 2009 03:32:55 +0000 (11:32 +0800)
This patch adds the helper shash_instance_ctx which is the shash
analogue of crypto_instance_ctx.

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

index 3af34ca8e8bcbcf217187824774bf55481101b68..069b93e1a8ec47ab1bf290ff60182cde42b9c93f 100644 (file)
@@ -110,6 +110,11 @@ static inline struct shash_instance *shash_instance(
                            struct shash_instance, alg);
 }
 
+static inline void *shash_instance_ctx(struct shash_instance *inst)
+{
+       return crypto_instance_ctx(shash_crypto_instance(inst));
+}
+
 static inline struct shash_instance *shash_alloc_instance(
        const char *name, struct crypto_alg *alg)
 {