summaryrefslogtreecommitdiffstats
path: root/include/crypto/algapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r--include/crypto/algapi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index c533c0a291af..6f9fb27b2071 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -69,5 +69,10 @@ static inline void *crypto_instance_ctx(struct crypto_instance *inst)
return inst->__ctx;
}
+static inline struct cipher_alg *crypto_cipher_alg(struct crypto_cipher *tfm)
+{
+ return &crypto_cipher_tfm(tfm)->__crt_alg->cra_cipher;
+}
+
#endif /* _CRYPTO_ALGAPI_H */