Hello all, when I compile this with gcc on redhat 8, it passes the compilation but gets errors in linking that say:
-------
xxxx.o-undefined reference to BF_set_key
xxxx.o-undefined reference to BF_ecb_encrypt
-------
those two functions are in an include file... do I need to tell the main section that they exist?
Here's the code:
Thanks All,Code:#include <stdlib.h> #include <stdio.h> #include <openssl/blowfish.h> int main(int argc, char* argv[]) { BF_KEY *tkey; int ilen; char *data; unsigned char *in[64],*out[64]; strncpy(in,"hello",sizeof(in)); ilen=5; strncpy(data,"abcde",sizeof(data)); BF_set_key(tkey,ilen,data); BF_ecb_encrypt(in,out,tkey,BF_ENCRYPT); return 0; }



LinkBack URL
About LinkBacks



Google should turn up the basica algorithm.