- sha1_hash((char *)crypt_buf, CHALLENGE_SIZE, challenge_sha1);
- RC4_set_key(&ct->rc4c.send_key, RC4_KEY_LEN,
- crypt_buf + CHALLENGE_SIZE);
- RC4_set_key(&ct->rc4c.recv_key, RC4_KEY_LEN,
- crypt_buf + CHALLENGE_SIZE + RC4_KEY_LEN);
- hash_to_asc(challenge_sha1, buf);
+ hash_function((char *)crypt_buf, CHALLENGE_SIZE, challenge_hash);
+ ct->scc.send = sc_new(crypt_buf + CHALLENGE_SIZE, SESSION_KEY_LEN);
+ ct->scc.recv = sc_new(crypt_buf + CHALLENGE_SIZE + SESSION_KEY_LEN,
+ SESSION_KEY_LEN);
+ hash_to_asc(challenge_hash, buf);