The encrypted string is described inCode. Check the code ~
// Define a sha1 object
System. Security. cryptography. sha1 sha1 = New System. Security. cryptography. sha1cryptoserviceprovider ();
// Obtain the encrypted ciphertext byte array
// Pay attention to utf8, utf7, Unicode, and Other encoding options, such
// Byte [] bytresult = sha1.computehash (system. Text. encoding. utf8.getbytes (strname ));
// The encoding here adopts the default system encoding.
Byte [] Bytresult = Sha1.computehash (system. Text. encoding. Default. getbytes (strname ));
// Convert to string
Strname = Bitconverter. tostring (bytresult );
Or it is simpler:
Str = System. Web. Security. formsauthentication. hashpasswordforstoringinconfigfile (strinput, " Sha1 " );
You can further process the encrypted string or add a public password and then encrypt it to improve the encryption effect.
The same is true for MD5. You can change the related class or input.