- /* init rc4 keys with the second part of the random buffer */
- RC4_set_key(&rc4c.recv_key, RC4_KEY_LEN, rand_buf + CHALLENGE_SIZE);
- RC4_set_key(&rc4c.send_key, RC4_KEY_LEN, rand_buf + CHALLENGE_SIZE
- + RC4_KEY_LEN);
+ /* init stream cipher keys with the second part of the random buffer */
+ rc4c.recv = stream_cipher_new(rand_buf + CHALLENGE_SIZE, RC4_KEY_LEN);
+ rc4c.send = stream_cipher_new(rand_buf + CHALLENGE_SIZE + RC4_KEY_LEN,
+ RC4_KEY_LEN);