Add function to get md info from md context
Signed-off-by: Max Fillinger <max@max-fillinger.net>
diff --git a/include/mbedtls/md.h b/include/mbedtls/md.h
index 2b668f5..243e57a 100644
--- a/include/mbedtls/md.h
+++ b/include/mbedtls/md.h
@@ -138,6 +138,20 @@
const mbedtls_md_info_t *mbedtls_md_info_from_type( mbedtls_md_type_t md_type );
/**
+ * \brief This function returns the message-digest information
+ * from the given context.
+ *
+ * \param ctx The context from which to extract the information.
+ * This must be initialized (or \c NULL).
+ *
+ * \return The message-digest information associated with \p ctx.
+ * \return \c NULL if \p ctx is \c NULL.
+ */
+const mbedtls_md_info_t *mbedtls_md_info_from_ctx(
+ const mbedtls_md_context_t *ctx );
+
+
+/**
* \brief This function initializes a message-digest context without
* binding it to a particular message-digest algorithm.
*