Esempio n. 1
0
        public bool girisKontrol(string kullaniciAdi, string parola)
        {
            bool       onay = false;
            VTBaglan   vt   = new VTBaglan();
            Sifreleme  sf   = new Sifreleme();
            SqlCommand c    = new SqlCommand("select * from tb_kullanicilar where kullaniciAdi=@p1 and parola=@p2", vt.bagla());

            c.Parameters.AddWithValue("@p1", kullaniciAdi);
            c.Parameters.AddWithValue("@p2", sf.RijndaelSifrele(parola));
            SqlDataReader dr = c.ExecuteReader();

            if (dr.Read())
            {
                onay = true;
                giris(Convert.ToInt16(dr["ID"]), dr["adi"].ToString(), dr["soyadi"].ToString(), dr["kullaniciAdi"].ToString());
            }
            vt.bagla().Close();
            return(onay);
        }
Esempio n. 2
0
        private string sifrele(string parola)
        {
            Sifreleme srf = new Sifreleme();

            return(srf.RijndaelSifrele(parola));
        }