Public static string hashcryptstring (Stringst, String Method) {
IF (Method == "MD5") {
Strtext = System.Web.Security.FormSauthentication.hashPasswordforstoringInfigfile (Strtext, "MD5");
// md5 md5 = new md5cryptoserviceProvider ();
// strText = system.text.encoding.utf8.getstring (md5.computehash (system.text.encoding.utf8.getbytes (strtext)));
}
Else IF (Method == "SHA1") {
Strtext = System.Web.Security.FormSauthentication.HashPasswordforstoringInconfigfile (Strtext, "SHA1");
// sha1 sha1 = new sha1cryptoserviceProvider ();
// strText = system.text.encoding.utf8.getstring (sha1.computehash (system.text.encoding.utf8.getbytes (strText))));
}
Return strText;
}