我自己的加密~哈哈哈

  1. #region enc 
  2.             string _userID = this.textBox1.Text; 
  3.  
  4.             int keyword = 87; 
  5.  
  6.             int leng = _userID.Length; 
  7.  
  8.             Random rad = new Random(); 
  9.             int radp = rad.Next(0, leng); 
  10.  
  11.             string perid = "l" + _userID.Substring(0, radp) + "t" + _userID.Substring(radp) + (radp + keyword).ToString(); 
  12.              
  13.  
  14.             this.textBox2.Text = perid; 
  15.             #endregion  
  16.  
  17.  
  18.             #region enp 
  19.  
  20.             string bstring = this.textBox2.Text; 
  21.  
  22.             int pword = Convert.ToInt32(bstring.Substring(bstring.Length - 2))-keyword; 
  23.  
  24.             string p = bstring.Substring(1, pword) + bstring.Substring(pword + 2, bstring.Length - 2 - (pword + 2)); 
  25.  
  26.             this.textBox3.Text = p; 
  27.  
  28.  
  29.             #endregion 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章