Beispiel #1
0
        protected internal override void HandleData(ConnectionStatus data)
        {
            byte[] CMKey = new byte[16];

            Random rnd = new Random();

            rnd.NextBytes(CMKey);

            data.SMKey = SMKey;
            data.CMKey = CMKey;

            MD5Hash md5Hash = data.MD5;
            EncDec  encDec  = data.EncDec;

            byte[] decKey = md5Hash.GetKey(CMKey);
            byte[] encKey = md5Hash.GetKey(SMKey);

            encDec.CreateEncode(encKey);
            encDec.CreateDecode(decKey);
        }