Add _init() and _free() for hash modules
diff --git a/include/polarssl/md2.h b/include/polarssl/md2.h
index 96da06c..952b0bf 100644
--- a/include/polarssl/md2.h
+++ b/include/polarssl/md2.h
@@ -61,6 +61,20 @@
md2_context;
/**
+ * \brief Initialize MD2 context
+ *
+ * \param ctx MD2 context to be initialized
+ */
+void md2_init( md2_context *ctx );
+
+/**
+ * \brief Clear MD2 context
+ *
+ * \param ctx MD2 context to be cleared
+ */
+void md2_free( md2_context *ctx );
+
+/**
* \brief MD2 context setup
*
* \param ctx context to be initialized
diff --git a/include/polarssl/md4.h b/include/polarssl/md4.h
index 6302c3c..fc5a5cd 100644
--- a/include/polarssl/md4.h
+++ b/include/polarssl/md4.h
@@ -67,6 +67,20 @@
md4_context;
/**
+ * \brief Initialize MD4 context
+ *
+ * \param ctx MD4 context to be initialized
+ */
+void md4_init( md4_context *ctx );
+
+/**
+ * \brief Clear MD4 context
+ *
+ * \param ctx MD4 context to be cleared
+ */
+void md4_free( md4_context *ctx );
+
+/**
* \brief MD4 context setup
*
* \param ctx context to be initialized
diff --git a/include/polarssl/md5.h b/include/polarssl/md5.h
index bb0ebf3..2f378f6 100644
--- a/include/polarssl/md5.h
+++ b/include/polarssl/md5.h
@@ -67,6 +67,20 @@
md5_context;
/**
+ * \brief Initialize MD5 context
+ *
+ * \param ctx MD5 context to be initialized
+ */
+void md5_init( md5_context *ctx );
+
+/**
+ * \brief Clear MD5 context
+ *
+ * \param ctx MD5 context to be cleared
+ */
+void md5_free( md5_context *ctx );
+
+/**
* \brief MD5 context setup
*
* \param ctx context to be initialized
diff --git a/include/polarssl/ripemd160.h b/include/polarssl/ripemd160.h
index 754322d..e3b66c9 100644
--- a/include/polarssl/ripemd160.h
+++ b/include/polarssl/ripemd160.h
@@ -67,6 +67,20 @@
ripemd160_context;
/**
+ * \brief Initialize RIPEMD-160 context
+ *
+ * \param ctx RIPEMD-160 context to be initialized
+ */
+void ripemd160_init( ripemd160_context *ctx );
+
+/**
+ * \brief Clear RIPEMD-160 context
+ *
+ * \param ctx RIPEMD-160 context to be cleared
+ */
+void ripemd160_free( ripemd160_context *ctx );
+
+/**
* \brief RIPEMD-160 context setup
*
* \param ctx context to be initialized
diff --git a/include/polarssl/sha1.h b/include/polarssl/sha1.h
index 57a731b..cb0c436 100644
--- a/include/polarssl/sha1.h
+++ b/include/polarssl/sha1.h
@@ -67,6 +67,20 @@
sha1_context;
/**
+ * \brief Initialize SHA-1 context
+ *
+ * \param ctx SHA-1 context to be initialized
+ */
+void sha1_init( sha1_context *ctx );
+
+/**
+ * \brief Clear SHA-1 context
+ *
+ * \param ctx SHA-1 context to be cleared
+ */
+void sha1_free( sha1_context *ctx );
+
+/**
* \brief SHA-1 context setup
*
* \param ctx context to be initialized
diff --git a/include/polarssl/sha256.h b/include/polarssl/sha256.h
index 80a0224..b143674 100644
--- a/include/polarssl/sha256.h
+++ b/include/polarssl/sha256.h
@@ -68,6 +68,20 @@
sha256_context;
/**
+ * \brief Initialize SHA-256 context
+ *
+ * \param ctx SHA-256 context to be initialized
+ */
+void sha256_init( sha256_context *ctx );
+
+/**
+ * \brief Clear SHA-256 context
+ *
+ * \param ctx SHA-256 context to be cleared
+ */
+void sha256_free( sha256_context *ctx );
+
+/**
* \brief SHA-256 context setup
*
* \param ctx context to be initialized
diff --git a/include/polarssl/sha512.h b/include/polarssl/sha512.h
index c60564f..dfbae4a 100644
--- a/include/polarssl/sha512.h
+++ b/include/polarssl/sha512.h
@@ -69,6 +69,20 @@
sha512_context;
/**
+ * \brief Initialize SHA-512 context
+ *
+ * \param ctx SHA-512 context to be initialized
+ */
+void sha512_init( sha512_context *ctx );
+
+/**
+ * \brief Clear SHA-512 context
+ *
+ * \param ctx SHA-512 context to be cleared
+ */
+void sha512_free( sha512_context *ctx );
+
+/**
* \brief SHA-512 context setup
*
* \param ctx context to be initialized