X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sha256.cpp;h=48bfc00410a6d62204c28376f579d3b093969c8b;hb=43b5073d6f80a8dcb7044ecd127fd5893da033ab;hp=835d12ae46610fcae2e5b9dddcf95733a1a6e1e4;hpb=54d10d53c730ab81ca6464fe2f0e0ecbcd435672;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sha256.cpp b/src/modules/m_sha256.cpp index 835d12ae4..48bfc0041 100644 --- a/src/modules/m_sha256.cpp +++ b/src/modules/m_sha256.cpp @@ -57,15 +57,8 @@ */ #include "inspircd.h" -#ifdef HAS_STDINT -#include -#endif #include "modules/hash.h" -#ifndef HAS_STDINT -typedef unsigned int uint32_t; -#endif - #define SHA256_DIGEST_SIZE (256 / 8) #define SHA256_BLOCK_SIZE (512 / 8) @@ -254,14 +247,14 @@ class HashSHA256 : public HashProvider } public: - std::string sum(const std::string& data) + std::string GenerateRaw(const std::string& data) { unsigned char bytes[SHA256_DIGEST_SIZE]; SHA256(data.data(), bytes, data.length()); return std::string((char*)bytes, SHA256_DIGEST_SIZE); } - HashSHA256(Module* parent) : HashProvider(parent, "hash/sha256", 32, 64) {} + HashSHA256(Module* parent) : HashProvider(parent, "sha256", 32, 64) {} }; class ModuleSHA256 : public Module @@ -270,7 +263,6 @@ class ModuleSHA256 : public Module public: ModuleSHA256() : sha(this) { - ServerInstance->Modules->AddService(sha); } Version GetVersion() CXX11_OVERRIDE