PDA

View Full Version : Plz help me with newcamd



Haulin
11th August, 2011, 03:25 AM
hey guys, i have some issues about newcamd.

i want to write a newcamd client, but the protocal is vague, i hope someone can help me.

1.when the client connect to the server, the client would recieve 14 random bytes, well i call it random key, and the login key = random key ^ deskey(from config file). And the protocal says the message packet has to be encrypted with login key, would someone tell me how to encrypt message packet with login key?

2.Well, the random key and deskey are both 14 bytes, so the login key should be 14 bytes either, but see from the sample codes, login key is expanded to 16 bytes, i'm really confused, plz explain it to me.

3.The protocal says that the session key = deskey ^ usrpwd, but when should i use session key?