Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #define INCLUDE_BLOWFISH_DEFINE_H
00010
00011 struct BCoptions{
00012 unsigned char remove;
00013 unsigned char standardout;
00014 unsigned char compression;
00015 unsigned char type;
00016 unsigned long origsize;
00017 unsigned char securedelete;
00018 };
00019
00020 #define ENCRYPT 0
00021 #define DECRYPT 1
00022
00023 #define endianBig ((unsigned char) 0x45)
00024 #define endianLittle ((unsigned char) 0x54)
00025
00026 typedef unsigned int uInt32;
00027
00028 #ifdef WIN32
00029 #define random() rand()
00030 #define initstate(x,y,z) srand(x)
00031 #define lstat(x,y) stat(x,y)
00032 #endif
00033
00034 #ifndef S_ISREG
00035 #define S_ISREG(x) ( ((x)&S_IFMT)==S_IFREG )
00036 #endif
00037
00038 #define MAXKEYBYTES 56
00039
00040 struct BLOWFISH_CTX {
00041 uInt32 P[16 + 2];
00042 uInt32 S[4][256];
00043 };
00044
00045 void Blowfish_Init(BLOWFISH_CTX *ctx, unsigned char *key, int keyLen);
00046
00047 void Blowfish_Encrypt(BLOWFISH_CTX *ctx, uInt32 *xl, uInt32
00048 *xr);
00049
00050 void Blowfish_Decrypt(BLOWFISH_CTX *ctx, uInt32 *xl, uInt32
00051 *xr);