Example #1
0
        public bool Login(string login, string password)
        {
            User myUser = userStore.Get(login);

            if (myUser == null)
            {
                return(false);
            }
            if (myUser.Password == rsaEncryption.Encrypt(password))
            {
                return(true);
            }
            return(false);
        }
Example #2
0
 public string Encrypt(string data)
 {
     return(BitConverter.ToString(_rsaEncryption.Encrypt(Encoding.UTF8.GetBytes(data))));
 }