Ejemplo n.º 1
0
        private void SendRegisterInfo(QrCodeObject qrCodeObj)
        {
            JsonRemote message = new JsonRemote();

            message.PublicKey = securityManager.GetPublicKey();
            string content   = JsonConvert.SerializeObject(message);
            string strToSend = securityManager.EncryptAndEncodeMessage(content);

            WriteToSocket(strToSend);
        }
Ejemplo n.º 2
0
        public void SetConnectionWithInfo(string qrCodeInfo)
        {
            Console.WriteLine("WITH INFO FROM REGISTER");
            QrCodeObject qrCodeObj = JsonConvert.DeserializeObject <QrCodeObject>(qrCodeInfo);

            securityManager = new SecurityManager(qrCodeObj.KcPub.RSAParameters, qrCodeObj.Kd);

            ConnectingToDevice();
            SendRegisterInfo(qrCodeObj);
            Console.Write("END");
            ListeningFromSocketAsync();
        }