]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sha256.cpp
Change lockserv emergency unlock procedure, and add one for jumpserver [jackmcbarn]
[user/henk/code/inspircd.git] / src / modules / m_sha256.cpp
index 8c2b00eeaa387d53ee81a7fb02521ca3b1b96d35..707853a49490865d27a64cb1a254b47a7db07264 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  */
 
 /* $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