瀏覽代碼

crypto: shash - Add shash_instance_ctx

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>
Herbert Xu 16 年之前
父節點
當前提交
ef5d590c9b
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      include/crypto/internal/hash.h

+ 5 - 0
include/crypto/internal/hash.h

@@ -110,6 +110,11 @@ static inline struct shash_instance *shash_instance(
 			    struct shash_instance, alg);
 			    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(
 static inline struct shash_instance *shash_alloc_instance(
 	const char *name, struct crypto_alg *alg)
 	const char *name, struct crypto_alg *alg)
 {
 {