]> git.sesse.net Git - freerainbowtables/blobdiff - Common/rt api/Public.h
64-bit fixes for distrrtgen
[freerainbowtables] / Common / rt api / Public.h
index a2f5657fcb5d485e3a7f0994fb2726560dc31554..b3103f7d3dda3cedba6f0f9037081448af467967 100644 (file)
@@ -1,24 +1,41 @@
 /*
-   RainbowCrack - a general propose implementation of Philippe Oechslin's faster time-memory trade-off technique.
-
-   Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
-*/
+ * freerainbowtables is a project for generating, distributing, and using
+ * perfect rainbow tables
+ *
+ * Copyright (C) Zhu Shuanglei <shuanglei@hotmail.com>
+ * Copyright 2009, 2010 DaniĆ«l Niggebrugge <niggebrugge@fox-it.com>
+ * Copyright 2009, 2010 James Nobis <frt@quelrod.net>
+ *
+ * This file is part of freerainbowtables.
+ *
+ * freerainbowtables 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.
+ *
+ * freerainbowtables 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 freerainbowtables.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
 #ifndef _PUBLIC_H
 #define _PUBLIC_H
 
 #include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include <string>
 #include <vector>
 #include <list>
-using namespace std;
 
-#ifdef _WIN32
-       #define uint64 unsigned __int64
-#else
-       #define uint64 u_int64_t
-#endif
+#include "global.h"
+
+using namespace std;
 
 struct RainbowChain
 {
@@ -35,8 +52,8 @@ struct RainbowChainCP
 struct IndexChain
 {
        uint64 nPrefix;
-       int nFirstChain;
-       unsigned int nChainCount;
+       UINT4 nFirstChain;
+       UINT4 nChainCount;
 };
 struct FoundRainbowChain
 {
@@ -70,12 +87,14 @@ typedef struct
 
 unsigned int GetFileLen(FILE* file);
 string TrimString(string s);
+bool boinc_ReadLinesFromFile(string sPathName, vector<string>& vLine);
 bool ReadLinesFromFile(string sPathName, vector<string>& vLine);
 bool SeperateString(string s, string sSeperator, vector<string>& vPart);
 string uint64tostr(uint64 n);
 string uint64tohexstr(uint64 n);
 string HexToStr(const unsigned char* pData, int nLen);
 unsigned int GetAvailPhysMemorySize();
+string GetApplicationPath();
 void ParseHash(string sHash, unsigned char* pHash, int& nHashLen);
 bool GetHybridCharsets(string sCharset, vector<tCharset>& vCharset);
 void Logo();