Introduced name space
Using system.web.security;
2. Define the string to encrypted
String BeforeEncrypt, Afterencrypt;
3. Start encryption (MD5)
Afterencrypt == Formsauthentication.hashPasswordforStoringInConfigfile (BeforeEncrypt, "MD5");
4. Use SHA1 encryption (SHA1)
Afterencrypt == Formsauthentication.hashPasswordforStoringInConfigfile (BeforeEncrypt, "SHA1");
5. The length of the encrypted string
String length after SHA1 encryption is 40, and the string length after MD5 encryption is: 32