摘要:
private string GenerateCheckCode()
{
int number;
char code;
string checkCode = String.Empty;
System.Random random = new Random();
for(int i=0; i {
number = random.Next();
if(number % 2 == 0)
code = (char)('0' + (char)(number % 10));
else
code = (char)('A' + (char)(number % 26));
checkCode += code.ToString();
}
Response.Cookies.Add(new HttpCookie("CheckCode", checkCode));
阅读全文
摘要:
public enum HashType : int
{
SHA1,
SHA256,
SHA384,
SHA512,
MD5,
RIPEMD160
} 阅读全文