summaryrefslogtreecommitdiff
path: root/src/modules/m_md5.h
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-04 20:41:02 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-04 20:41:02 +0000
commit5e8fc20355e139d4fd81ab1faad7e564e55fef29 (patch)
treef462f1687a0ed8380dede4052f6ddd4757629834 /src/modules/m_md5.h
parente824558b7b38ce876991bc7e92a4dc4f40c9fc79 (diff)
Header for md5 request classes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5849 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_md5.h')
-rw-r--r--src/modules/m_md5.h75
1 files changed, 75 insertions, 0 deletions
diff --git a/src/modules/m_md5.h b/src/modules/m_md5.h
new file mode 100644
index 000000000..2e80c00e2
--- /dev/null
+++ b/src/modules/m_md5.h
@@ -0,0 +1,75 @@
+#ifndef __MD5_H__
+#define __MD5_H__
+
+#include "modules.h"
+
+class MD5Request : public Request
+{
+ unsigned int* keys;
+ const char* outputs;
+ std::string tohash;
+ public:
+ MD5Request(Module* Me, Module* Target) : Request(Me, Target, "MD5_RESET")
+ {
+ }
+
+ MD5Request(Module* Me, Module* Target, const std::string &hashable) : Request(Me, Target, "MD5_SUM"), keys(NULL), outputs(NULL), tohash(hashable)
+ {
+ }
+
+ MD5Request(Module* Me, Module* Target, unsigned int* k) : Request(Me, Target, "MD5_KEY"), keys(k), outputs(NULL), tohash("")
+ {
+ }
+
+ MD5Request(Module* Me, Module* Target, const char* out) : Request(Me, Target, "MD5_HEX"), keys(NULL), outputs(out), tohash("")
+ {
+ }
+
+ const char* GetHashData()
+ {
+ return tohash.c_str();
+ }
+
+ unsigned int* GetKeyData()
+ {
+ return keys;
+ }
+
+ const char* GetOutputs()
+ {
+ return outputs;
+ }
+};
+
+class MD5ResetRequest : public MD5Request
+{
+ public:
+ MD5ResetRequest(Module* Me, Module* Target) : MD5Request(Me, Target)
+ {
+ }
+};
+
+class MD5SumRequest : public MD5Request
+{
+ public:
+ MD5SumRequest(Module* Me, Module* Target, const std::string &data) : MD5Request(Me, Target, data)
+ {
+ }
+};
+
+class MD5KeyRequest : public MD5Request
+{
+ MD5KeyRequest(Module* Me, Module* Target, unsigned int* data) : MD5Request(Me, Target, data)
+ {
+ }
+};
+
+class MD5HexRequest : public MD5Request
+{
+ MD5HexRequest(Module* Me, Module* Target, const char* data) : MD5Request(Me, Target, data)
+ {
+ }
+};
+
+#endif
+