X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_md5.cpp;h=6e6f5006fd552b50f1866af0428d49881936ef96;hb=43b5073d6f80a8dcb7044ecd127fd5893da033ab;hp=ecf76d07cb8cd7ff06045d8a7e95ee2675fe2d9b;hpb=f71e6bf9cb41811f18864f5d4eecb26e29d03f25;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_md5.cpp b/src/modules/m_md5.cpp index ecf76d07c..6e6f5006f 100644 --- a/src/modules/m_md5.cpp +++ b/src/modules/m_md5.cpp @@ -244,29 +244,15 @@ class MD5Provider : public HashProvider MD5Final((unsigned char*)dest, &context); } - - void GenHash(const char* src, char* dest, const char* xtab, unsigned int* ikey, size_t srclen) - { - unsigned char bytes[16]; - - MyMD5((char*)bytes, (void*)src, srclen, ikey); - - for (int i = 0; i < 16; i++) - { - *dest++ = xtab[bytes[i] / 16]; - *dest++ = xtab[bytes[i] % 16]; - } - *dest++ = 0; - } public: - std::string sum(const std::string& data) + std::string GenerateRaw(const std::string& data) { char res[16]; MyMD5(res, (void*)data.data(), data.length(), NULL); return std::string(res, 16); } - MD5Provider(Module* parent) : HashProvider(parent, "hash/md5", 16, 64) {} + MD5Provider(Module* parent) : HashProvider(parent, "md5", 16, 64) {} }; class ModuleMD5 : public Module