#include #include #include #include #include #define SIZE 64 int main() { unsigned char* in = (unsigned char *)"TestData"; unsigned char* out = (unsigned char*) calloc(SIZE+1, sizeof(char)); unsigned char* out2 = (unsigned char*) calloc(SIZE+1, sizeof(char)); //pData = (int*) calloc (i,sizeof(int)); BF_KEY *key = (BF_KEY*) calloc(1, sizeof(BF_KEY)); std::string result; /* set up a test key */ BF_set_key(key, SIZE, (const unsigned char*)"TestKey!" ); /* test out encryption */ char buf[sizeof(BF_KEY)]; BF_ecb_encrypt(in, out, key, BF_ENCRYPT); for(int i=0;i