diff options
author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-05-30 17:30:00 +0000 |
---|---|---|
committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-05-30 17:30:00 +0000 |
commit | b6d45c8704e2f0ad1c1082e78f51bb63aaf38f71 (patch) | |
tree | 97512cc2b5753fdf1d62b691914ae058c4ef583d /tools.cpp | |
parent | 03bd97b1a02630f6c1d2e6290182b063507485e3 (diff) | |
download | vdr-plugin-live-b6d45c8704e2f0ad1c1082e78f51bb63aaf38f71.tar.gz vdr-plugin-live-b6d45c8704e2f0ad1c1082e78f51bb63aaf38f71.tar.bz2 |
- now using own MD5 algorithm
Diffstat (limited to 'tools.cpp')
-rw-r--r-- | tools.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -10,6 +10,7 @@ #include "live.h" #include "setup.h" #include "tools.h" +#include "md5.h" using namespace std; @@ -134,7 +135,14 @@ string ZeroPad(int number) std::string MD5Hash(std::string const& str) { - unsigned char md5[MD5_DIGEST_LENGTH]; + char* szInput = strdup(str.c_str()); + if (!szInput) return ""; + char* szRes = MD5String(szInput); + string res = szRes; + free(szRes); + return res; + +/* unsigned char md5[MD5_DIGEST_LENGTH]; MD5(reinterpret_cast<const unsigned char*>(str.c_str()), str.size(), md5); ostringstream hashStr; @@ -143,6 +151,7 @@ std::string MD5Hash(std::string const& str) hashStr << (0 + md5[i]); return hashStr.str(); +*/ } #define HOURS(x) ((x)/100) |