]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sha256.cpp
Unset umode +x when a different vhost is set on a user
[user/henk/code/inspircd.git] / src / modules / m_sha256.cpp
index 679a97ae0da12a30dafa646c825ecb6dd9d9a284..707853a49490865d27a64cb1a254b47a7db07264 100644 (file)
  */
 
 /* $ModDesc: Allows for SHA-256 encrypted oper passwords */
-/* $ModDep: m_hash.h */
 
 #include "inspircd.h"
 #ifdef HAS_STDINT
 #include <stdint.h>
 #endif
-#include "m_hash.h"
+#include "hash.h"
 
 #ifndef HAS_STDINT
 typedef unsigned int uint32_t;
 #endif
 
+#define SHA256_DIGEST_SIZE (256 / 8)
+#define SHA256_BLOCK_SIZE  (512 / 8)
+
 /** An sha 256 context, used by m_opersha256
  */
 class SHA256Context
@@ -257,7 +259,7 @@ class HashSHA256 : public HashProvider
                return "";
        }
 
-       HashSHA256(Module* parent) : HashProvider(parent, "hash/sha256") {}
+       HashSHA256(Module* parent) : HashProvider(parent, "hash/sha256", 32, 64) {}
 };
 
 class ModuleSHA256 : public Module