aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/crypto/internal/hash.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/crypto/internal/hash.h')
-rw-r--r--include/crypto/internal/hash.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h
index f68dab38f160..cf8d7f99c93d 100644
--- a/include/crypto/internal/hash.h
+++ b/include/crypto/internal/hash.h
@@ -220,6 +220,12 @@ static inline struct shash_instance *shash_instance(
struct shash_instance, alg);
}
+static inline struct shash_instance *shash_alg_instance(
+ struct crypto_shash *shash)
+{
+ return shash_instance(crypto_tfm_alg_instance(&shash->base));
+}
+
static inline void *shash_instance_ctx(struct shash_instance *inst)
{
return crypto_instance_ctx(shash_crypto_instance(inst));