server encrypts using openssl and client decrypt using java
===

I have a server which uses openssl and rc4 to encrypt . I am trying to decrypt at the client end using java (android client). the process is as follows:

1. Open a ssl socket connection and connect to the server.
2. Receive the RC4 key from the server.
3. Use the received Rc4 key to decrypt further data coming from the server.

Any pointers to accomplish the same will be very useful. I am doing the same thing for a windows vc++ client using open ssl as follows:

    EVP_CipherInit_ex(&D_Ctx,EVP_rc4(),NULL,(unsigned char *) _RC4Key,1);
  
  Here _RC4Key is char[1024]


Experts please suggest me ways to accomplish the same in java on android.

Thanks,
grv

