]> git.sesse.net Git - freerainbowtables/blobdiff - Client Applications/rcracki_mt/HashRoutine.cpp
test
[freerainbowtables] / Client Applications / rcracki_mt / HashRoutine.cpp
index c85193f95297df3e96c1c19f98720ad8a8a5067b..595f13d29a044c93632128a23b4e3ebe93e278bd 100644 (file)
@@ -1,96 +1,96 @@
-/*\r
- * rcracki_mt is a multithreaded implementation and fork of the original \r
- * RainbowCrack\r
- *\r
- * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>\r
- * Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>\r
- * Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>\r
- * Copyright 2009, 2010 James Nobis <frt@quelrod.net>\r
- *\r
- * This file is part of rcracki_mt.\r
- *\r
- * rcracki_mt is free software: you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation, either version 2 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * rcracki_mt is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with rcracki_mt.  If not, see <http://www.gnu.org/licenses/>.\r
- */\r
-\r
-#if defined(_WIN32) && !defined(__GNUC__)\r
-       #pragma warning(disable : 4786 4267 4018)\r
-#endif\r
-\r
-#include "HashRoutine.h"\r
-#include "HashAlgorithm.h"\r
-\r
-//////////////////////////////////////////////////////////////////////\r
-\r
-CHashRoutine::CHashRoutine()\r
-{\r
-       // Notice: MIN_HASH_LEN <= nHashLen <= MAX_HASH_LEN\r
-\r
-\r
-       AddHashRoutine("lm",   HashLM,   8);\r
-       AddHashRoutine("ntlm", HashNTLM, 16);\r
-//     AddHashRoutine("md2",  HashMD2,  16);\r
-       AddHashRoutine("md4",  HashMD4,  16);\r
-       AddHashRoutine("md5",  HashMD5,  16);\r
-       AddHashRoutine("doublemd5",  HashDoubleMD5,  16);\r
-       AddHashRoutine("sha1", HashSHA1, 20);\r
-//     AddHashRoutine("ripemd160", HashRIPEMD160, 20);\r
-       AddHashRoutine("mysql323", HashMySQL323, 8);\r
-       AddHashRoutine("mysqlsha1", HashMySQLSHA1, 20);\r
-       AddHashRoutine("ciscopix", HashPIX, 16);\r
-       AddHashRoutine("mscache", HashMSCACHE, 16);\r
-       AddHashRoutine("halflmchall", HashHALFLMCHALL, 8);\r
-\r
-       // Added from mao\r
-       AddHashRoutine("lmchall", HashLMCHALL, 24);\r
-       AddHashRoutine("ntlmchall", HashNTLMCHALL, 24);\r
-       AddHashRoutine("oracle", HashORACLE, 8);\r
-}\r
-\r
-CHashRoutine::~CHashRoutine()\r
-{\r
-}\r
-\r
-void CHashRoutine::AddHashRoutine(string sHashRoutineName, HASHROUTINE pHashRoutine, int nHashLen)\r
-{\r
-       vHashRoutineName.push_back(sHashRoutineName);\r
-       vHashRoutine.push_back(pHashRoutine);\r
-       vHashLen.push_back(nHashLen);\r
-}\r
-\r
-string CHashRoutine::GetAllHashRoutineName()\r
-{\r
-       string sRet;\r
-       UINT4 i;\r
-       for (i = 0; i < vHashRoutineName.size(); i++)\r
-               sRet += vHashRoutineName[i] + " ";\r
-\r
-       return sRet;\r
-}\r
-\r
-void CHashRoutine::GetHashRoutine(string sHashRoutineName, HASHROUTINE& pHashRoutine, int& nHashLen)\r
-{\r
-       UINT4 i;\r
-       for (i = 0; i < vHashRoutineName.size(); i++)\r
-       {\r
-               if (sHashRoutineName == vHashRoutineName[i])\r
-               {\r
-                       pHashRoutine = vHashRoutine[i];\r
-                       nHashLen = vHashLen[i];\r
-                       return;\r
-               }\r
-       }\r
-\r
-       pHashRoutine = NULL;\r
-       nHashLen = 0;\r
-}\r
+/*
+ * rcracki_mt is a multithreaded implementation and fork of the original 
+ * RainbowCrack
+ *
+ * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
+ * Copyright Martin Westergaard Jørgensen <martinwj2005@gmail.com>
+ * Copyright 2009, 2010 Daniël Niggebrugge <niggebrugge@fox-it.com>
+ * Copyright 2009, 2010 James Nobis <frt@quelrod.net>
+ *
+ * This file is part of rcracki_mt.
+ *
+ * rcracki_mt is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * rcracki_mt is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with rcracki_mt.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if defined(_WIN32) && !defined(__GNUC__)
+       #pragma warning(disable : 4786 4267 4018)
+#endif
+
+#include "HashRoutine.h"
+#include "HashAlgorithm.h"
+
+//////////////////////////////////////////////////////////////////////
+
+CHashRoutine::CHashRoutine()
+{
+       // Notice: MIN_HASH_LEN <= nHashLen <= MAX_HASH_LEN
+
+
+       AddHashRoutine("lm",   HashLM,   8);
+       AddHashRoutine("ntlm", HashNTLM, 16);
+//     AddHashRoutine("md2",  HashMD2,  16);
+       AddHashRoutine("md4",  HashMD4,  16);
+       AddHashRoutine("md5",  HashMD5,  16);
+       AddHashRoutine("doublemd5",  HashDoubleMD5,  16);
+       AddHashRoutine("sha1", HashSHA1, 20);
+//     AddHashRoutine("ripemd160", HashRIPEMD160, 20);
+       AddHashRoutine("mysql323", HashMySQL323, 8);
+       AddHashRoutine("mysqlsha1", HashMySQLSHA1, 20);
+       AddHashRoutine("ciscopix", HashPIX, 16);
+       AddHashRoutine("mscache", HashMSCACHE, 16);
+       AddHashRoutine("halflmchall", HashHALFLMCHALL, 8);
+
+       // Added from mao
+       AddHashRoutine("lmchall", HashLMCHALL, 24);
+       AddHashRoutine("ntlmchall", HashNTLMCHALL, 24);
+       AddHashRoutine("oracle", HashORACLE, 8);
+}
+
+CHashRoutine::~CHashRoutine()
+{
+}
+
+void CHashRoutine::AddHashRoutine(string sHashRoutineName, HASHROUTINE pHashRoutine, int nHashLen)
+{
+       vHashRoutineName.push_back(sHashRoutineName);
+       vHashRoutine.push_back(pHashRoutine);
+       vHashLen.push_back(nHashLen);
+}
+
+string CHashRoutine::GetAllHashRoutineName()
+{
+       string sRet;
+       UINT4 i;
+       for (i = 0; i < vHashRoutineName.size(); i++)
+               sRet += vHashRoutineName[i] + " ";
+
+       return sRet;
+}
+
+void CHashRoutine::GetHashRoutine(string sHashRoutineName, HASHROUTINE& pHashRoutine, int& nHashLen)
+{
+       UINT4 i;
+       for (i = 0; i < vHashRoutineName.size(); i++)
+       {
+               if (sHashRoutineName == vHashRoutineName[i])
+               {
+                       pHashRoutine = vHashRoutine[i];
+                       nHashLen = vHashLen[i];
+                       return;
+               }
+       }
+
+       pHashRoutine = NULL;
+       nHashLen = 0;
+}