From: levill_r <levill_r@4aad255d-cdde-0310-9447-f3009e2ae8c0>
* libmd5/md5.cc (MD5::MD5(unsigned char *)): New.
git-svn-id:
https://svn.lrde.epita.fr/svn/oln/trunk@4659
4aad255d-cdde-0310-9447-f3009e2ae8c0
---
dynamic-use-of-static-c++/ChangeLog | 6 ++++++
dynamic-use-of-static-c++/libmd5/md5.cc | 10 ++++++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/dynamic-use-of-static-c++/ChangeLog b/dynamic-use-of-static-c++/ChangeLog
index eeaff70..3412c9b 100644
--- a/dynamic-use-of-static-c++/ChangeLog
+++ b/dynamic-use-of-static-c++/ChangeLog
@@ -1,3 +1,9 @@
+2009-10-22 Roland Levillain <roland(a)lrde.epita.fr>
+
+ Add a missing constructor to class MD5.
+
+ * libmd5/md5.cc (MD5::MD5(unsigned char *)): New.
+
2009-10-20 Roland Levillain <roland(a)lrde.epita.fr>
Exercise libmd5.
diff --git a/dynamic-use-of-static-c++/libmd5/md5.cc
b/dynamic-use-of-static-c++/libmd5/md5.cc
index 6d9cab5..876e887 100644
--- a/dynamic-use-of-static-c++/libmd5/md5.cc
+++ b/dynamic-use-of-static-c++/libmd5/md5.cc
@@ -222,6 +222,16 @@ void MD5::finalize (){
+MD5::MD5(unsigned char *string){
+
+ init(); // must be called be all constructors
+ update(string, strlen((char*)string));
+ finalize ();
+}
+
+
+
+
MD5::MD5(FILE *file){
init(); // must be called be all constructors
--
1.6.5