Exemple #1
0
 public void DesifruotiVisusSlaptazodzius()
 {
     foreach (Paskyra current in paskyros)
     {
         current.hashedPassword = HashDehash.Decrypt(current.hashedPassword, "manodieve");
     }
     VisiVartotojai();
 }
Exemple #2
0
 public string DesifruotiVartotojoSlaptazodi(string username)
 {
     foreach (Paskyra current in paskyros)
     {
         if (current.username.Equals(username))
         {
             string tempstring = (string.Format("{0} {1}", current.username, HashDehash.Decrypt(current.hashedPassword, "manodieve")));
             return(tempstring);
         }
     }
     return("Toks username nerastas");
 }
Exemple #3
0
        public string NaujaPaskyra(string username, string password)
        {
            Paskyra temp = new Paskyra();

            temp.username       = username;
            temp.hashedPassword = HashDehash.Encrypt(password, "manodieve");
            string tempstring = (string.Format("{0}\n{1}", temp.username, temp.hashedPassword));

            paskyros.Add(temp);

            return(tempstring);
        }
Exemple #4
0
 public string PatikrintiSlaptazodi(string username, string password)
 {
     foreach (Paskyra current in paskyros)
     {
         if (current.username.Equals(username))
         {
             string unhashedPassword = HashDehash.Decrypt(current.hashedPassword, "manodieve");
             if (unhashedPassword.Equals(password))
             {
                 return("Teisingas");
             }
             else
             {
                 return("Neteisingas");
             }
         }
     }
     return("Toks username nerastas");
 }