diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-21 17:08:54 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-02-21 17:08:54 +0000 |
commit | 527c492cf1c86ede062c49d45ebda17c8c6dfc68 (patch) | |
tree | 2204d2bffcec36925ca8b5dfd710b9d4edef9b63 /src/modules/m_sha256.cpp | |
parent | f91a61fa22b239384c31526fd11da1e3030aaa96 (diff) |
Add HMAC implementation to HashProvider
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12508 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_sha256.cpp')
-rw-r--r-- | src/modules/m_sha256.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_sha256.cpp b/src/modules/m_sha256.cpp index 679a97ae0..707853a49 100644 --- a/src/modules/m_sha256.cpp +++ b/src/modules/m_sha256.cpp @@ -48,18 +48,20 @@ */ /* $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 |