getCipher(
byte[] key )
{
SecretKeySpec secret_key_spec = new SecretKeySpec( key, "RC4" );
RC4Engine rc4_engine = new RC4Engine();
CipherParameters params_a = new KeyParameter( secret_key_spec.getEncoded());
// for RC4 enc/dec is irrelevant
rc4_engine.init( true, params_a );
// skip first 1024 bytes of stream to protected against a Fluhrer, Mantin and Shamir attack
byte[] temp = new byte[1024];
rc4_engine.processBytes( temp, 0, temp.length, temp, 0 );
return( rc4_engine );
}