//C#版
public static string Encrypt(string plain)//对密码加密
    {
        byte[] buffer = System.Text.Encoding.UTF8.GetBytes(plain);
        System.Security.Cryptography.SHA1CryptoServiceProvider sha = new System.Security.Cryptography.SHA1CryptoServiceProvider();
        byte[] hash = sha.ComputeHash(buffer);
        System.Text.StringBuilder passwordBuilder = new System.Text.StringBuilder(32);
        foreach (byte hashByte in hash)
        {
            passwordBuilder.Append(hashByte.ToString("x2"));        }
        return passwordBuilder.ToString();
    }
给出的加密算法,希望能得到解密算法,非常感谢