some changes for compalibility with Visual C++ 2005 compiler
git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@48 b624d157-de02-0410-bad0-e51aec6abb33
This commit is contained in:
parent
d68659e395
commit
68f1d12d74
|
@ -16,6 +16,7 @@
|
||||||
#define BLOWFISH_H
|
#define BLOWFISH_H
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
|
#include <qglobal.h>
|
||||||
//#include <stdint.h>
|
//#include <stdint.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
using std::string;
|
using std::string;
|
||||||
|
@ -24,7 +25,10 @@ using std::string;
|
||||||
#define BLOWFISH_ROUNDS 16
|
#define BLOWFISH_ROUNDS 16
|
||||||
#define CIPHER_ALGO_BLOWFISH 4 /* blowfish 128 bit key */
|
#define CIPHER_ALGO_BLOWFISH 4 /* blowfish 128 bit key */
|
||||||
|
|
||||||
typedef uint8_t byte;
|
#define uint8_t Q_UINT8
|
||||||
|
#define uint16_t Q_UINT16
|
||||||
|
#define uint32_t Q_UINT32
|
||||||
|
#define byte Q_UINT8
|
||||||
|
|
||||||
/** blowfish encryption algorithm.
|
/** blowfish encryption algorithm.
|
||||||
* Derived from libgcrypt-1.1.12
|
* Derived from libgcrypt-1.1.12
|
||||||
|
|
|
@ -26,11 +26,7 @@
|
||||||
|
|
||||||
// Rotate x bits to the left
|
// Rotate x bits to the left
|
||||||
#ifndef ROL32
|
#ifndef ROL32
|
||||||
#ifdef _MSC_VER
|
#define ROL32(_val32, _nBits) (((_val32)<<(_nBits))|((_val32)>>(32-(_nBits))))
|
||||||
#define ROL32(_val32, _nBits) _rotl(_val32, _nBits)
|
|
||||||
#else
|
|
||||||
#define ROL32(_val32, _nBits) (((_val32)<<(_nBits))|((_val32)>>(32-(_nBits))))
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef KEEPASS_LITTLE_ENDIAN
|
#ifdef KEEPASS_LITTLE_ENDIAN
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <strstream>
|
#include <strstream>
|
||||||
|
|
||||||
using namespace std;
|
|
||||||
|
|
||||||
// C Includes
|
// C Includes
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
#ifndef CIniFile_H
|
#ifndef CIniFile_H
|
||||||
#define CIniFile_H
|
#define CIniFile_H
|
||||||
using namespace std;
|
|
||||||
// C++ Includes
|
// C++ Includes
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -21,6 +21,8 @@ using namespace std;
|
||||||
// C Includes
|
// C Includes
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
#define MAX_KEYNAME 128
|
#define MAX_KEYNAME 128
|
||||||
#define MAX_VALUENAME 128
|
#define MAX_VALUENAME 128
|
||||||
#define MAX_VALUEDATA 2048
|
#define MAX_VALUEDATA 2048
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream.h>
|
#include <fstream>
|
||||||
#include <qdatetime.h>
|
#include <qdatetime.h>
|
||||||
#include <qobject.h>
|
#include <qobject.h>
|
||||||
#include "random.h"
|
#include "random.h"
|
||||||
|
|
Loading…
Reference in New Issue