遗忘海岸

江湖程序员 -Feiph(LM战士)

导航

2011年7月15日 #

生成随机密码

摘要: 导入下面的命名空间using System.Security.Cryptography;==============代码===================== protected string RndPwd() { int[] arr = new int[]{ 1, 2, 3, 4, 5, 6, 7, 8, 9,6,6,8,8,9,9,1 }; var r = new RNGCryptoServiceProvider(); var bytes = new byte[arr.Length * 2]; r.GetBytes(bytes); for (int i = 0; i < byte 阅读全文

posted @ 2011-07-15 10:53 遗忘海岸 阅读(198) 评论(0) 推荐(0) 编辑