#include "Includes.h"
enum BlowfishAlgorithm
{
ECB,
CBC,
CFB64,
OFB64,
};
class Blowfish
{
public:
struct bf_key_st
{
unsigned long P[18];
unsigned long S[1024];
};
Blowfish(BlowfishAlgorithm algorithm);
void Dispose();
void SetKey(unsigned char data[]);
unsigned char Encrypt(unsigned char buffer[]);
unsigned char Decrypt(unsigned char buffer[]);
char EncryptIV();
char DecryptIV();
private:
BlowfishAlgorithm _algorithm;
unsigned char _encryptIv[200];
unsigned char _decryptIv[200];
int _encryptNum;
int _decryptNum;
};
class GameCryptography
{
public:
Blowfish _blowfish;
GameCryptography(unsigned char key[]);
void Decrypt(unsigned char packet[]);
void Encrypt(unsigned char packet[]);
Blowfish Blowfish;
void SetKey(unsigned char k[]);
void SetIvs(unsigned char i1[],unsigned char i2[]);
};
GameCryptography::GameCryptography(unsigned char key[])
{
}
錯誤:智能感知:沒有默認構造函數存在類「Blowfish」???!沒有默認構造函數存在類
請不要刪除您的整個問題。留在原地。 – greyfade 2011-02-12 23:23:08
只要你不使用默認構造函數就沒有問題。當沒有明顯的默認參數時,始終在構造中指定參數是可以的。 – 2011-02-13 14:52:37