From 5858eb1d2870cf3d8d31a5dc1e1c13fc1fa3772b Mon Sep 17 00:00:00 2001 From: Marek Date: Mon, 10 Nov 2014 14:41:30 +0100 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index bbbfe7e..a74244e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Class to create MD5 checksum from file or string int main(int argc,char** argv){ char cstring[] = "To jest testowy string"; - std::string str = "Bla, to jest test :)"; + std::string str = "Bla, to jest test :)"; /* MD5 from std::string */ printf("md5sum: %s\n", md5sum( str ).c_str()); @@ -25,9 +25,17 @@ int main(int argc,char** argv){ /* Short MD5 from c-string */ printf("md5sum6: %s\n", md5sum6( cstring ).c_str()); + + /* Short MD5 from std::string */ + printf("md5sum6: %s\n", md5sum6( str ).c_str()); + + /* MD5 from opened file */ + std::FILE* file = std::fopen("README.md", "rb"); + printf("md5file: %s\n", md5file(file).c_str()); + std::fclose(file); - /* we're done */ - return EXIT_SUCCESS; + /* we're done */ + return EXIT_SUCCESS; } ```