Example #1
0
 public bool SignIn(string userName)
 {
     try
     {
         UserName = userName;
         using (StreamReader reader = new StreamReader(userName + ".pswds"))
         {
             string xml = reader.ReadToEnd();
             userData = UserData.LoadFromXMLString(fileEncryptor.Decrypt(xml));
             if (HashingSHA.Hash(userName) == userData.UserNameHashed)
             {
                 return(true);
             }
             reader.Close();
         }
     }
     catch (Exception ioexc)
     {
         Console.Write("Error reading the file");
     }
     return(false);
 }
Example #2
0
 public string ViewPassword(TDES tdes)
 {
     return(tdes.Decrypt(password));
 }
Example #3
0
 public string ViewUserName(TDES tdes)
 {
     return(tdes.Decrypt(userName));
 }