Exemplo n.º 1
0
 public void DesifruotiVisusSlaptazodzius()
 {
     foreach (Paskyra current in paskyros)
     {
         current.hashedPassword = HashDehash.Decrypt(current.hashedPassword, "manodieve");
     }
     VisiVartotojai();
 }
Exemplo n.º 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");
 }
Exemplo n.º 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);
        }
Exemplo n.º 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");
 }