make ret_from_status() global function and move it to has_info.[ch]
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/library/hash_info.h b/library/hash_info.h
index 67983f7..54f5f7c 100644
--- a/library/hash_info.h
+++ b/library/hash_info.h
@@ -74,4 +74,12 @@
*/
mbedtls_md_type_t mbedtls_hash_info_md_from_psa( psa_algorithm_t psa_alg );
+/** Convert PSA status to MD error code.
+ *
+ * \param status PSA status.
+ *
+ * \return The corresponding MD error code,
+ */
+int mbedtls_md_error_from_psa( psa_status_t status );
+
#endif /* MBEDTLS_HASH_INFO_H */