Exemple #1
0
 protected void btnPwd_Click(object sender, EventArgs e)
 {
     string slt = BCrypt.Net.BCrypt.GenerateSalt(15);
     RndPwd rnd = new RndPwd();
     string pwd = rnd.Generate(30);
     string hp = BCrypt.Net.BCrypt.HashPassword(pwd, slt);
     //lblpwd.Text = hp + "<br />" + pwd;
 }
Exemple #2
0
 /// <summary>
 /// Generate random password
 /// </summary>
 /// <returns></returns>
 public string genPass()
 {
     string rtn = "";
     string slt = BCrypt.Net.BCrypt.GenerateSalt(15);
     RndPwd rnd = new RndPwd();
     string pwd = rnd.Generate(12,30);
     string hp = BCrypt.Net.BCrypt.HashPassword(pwd, slt);
     return rtn;
 }