Exemplo n.º 1
0
        public static string RSAEncrypt(string Password)
        {
            var loginSpace = new RemoteSpace("tcp://" + _Resources.Resources.InternetProtocolAddress + ":5001/loginAttempts?CONN");
            var PubKey     = loginSpace.Query(typeof(string))[0] as string;

            byte[] BytePass = Encoding.UTF8.GetBytes(Password);// Convert.FromBase64String(Password);
            byte[] encryptedData;
            RSACryptoServiceProvider RSA = new RSACryptoServiceProvider();

            RSA.FromXmlString(PubKey);
            encryptedData = RSA.Encrypt(BytePass, true);
            RSA.Dispose();
            return(Convert.ToBase64String(encryptedData));
        }
 public void Init()
 {
     ConferenceRequests = new RemoteSpace("tcp://" + _Resources.Resources.InternetProtocolAddress + ":5001/getConferenceList?CONN");
     conferenceTuple    = new ObservableCollection <string>((List <string>)ConferenceRequests.Query(typeof(List <string>))[0]);
     //conferenceTuple = (ObservableCollection < string >) ConferenceRequests.Query(typeof(List<string>))[0];
 }
 private void RefreshButton_Click(object sender, RoutedEventArgs e)
 {
     Task.Factory.StartNew(() => conferenceTuple = new ObservableCollection <string>((List <string>)ConferenceRequests.Query(typeof(List <string>))[0]));
 }