public string EncryptStr(string PWD, int Format)
    {
       
string str = "";
       
switch (Format)
        {
           
case 0:
                str
= FormsAuthentication.HashPasswordForStoringInConfigFile(PWD, "SHA1");
               
break;
           
case 1:
                str
= FormsAuthentication.HashPasswordForStoringInConfigFile(PWD, "MD5");
               
break;
        }
       
return str;
    }

//加密不可逆

二、DES加密及解密的算法[常用密钥算法]

简单的使用:

Code

三、RSA加密及解密的算法[常用密钥算法]
简单的使用:

Code