sir,
 i have compiled this program in VC++.
#include <stdlib.h>
#include <stdio.h>
#include <rc4.h>
int main(void)
{
     char plaintext[12] = "Hello World?";
     char ciphertext[12];
     char mykey[16] = "this's my secret";
     RC4_KEY rc4_key;

     RC4_set_key(&rc4_key, 16, mykey); /* the key is 128 bits or 16 bytes
long */
     RC4(&rc4_key, 12, plaintext, ciphertext); /* plaintext is 12 bytes long
*/
     printf("%s\n", plaintext);
     printf("Encrypted: %s\n", ciphertext);
     RC4_set_key(&rc4_key, 16, mykey);  /* reset the key stream */
     RC4(&rc4_key, 12, ciphertext, plaintext); /* start decryption */
     printf("Decrypted: %s\n", plaintext);
     exit(1);
}


compile was successfull. but i get linking error as follows.
i have installed and copied the include and lib files of openSSL to the
respective folders of VC++.

--------------------Configuration: t1 - Win32 Debug--------------------
Compiling...
t1.c
Linking...
t1.obj : error LNK2001: unresolved external symbol _RC4
t1.obj : error LNK2001: unresolved external symbol _RC4_set_key
Debug/t1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

t1.exe - 3 error(s), 0 warning(s)




can u plz kindly help me to recover the above problem..........

Reply via email to