C# .net SHA1含密码加密算法

    public static string ToBase64hmac(string strText, string strKey)
    {
        HMACSHA1 myHMACSHA1 = new HMACSHA1(Encoding.UTF8.GetBytes(strKey));
        byte[] byteText = myHMACSHA1.ComputeHash(Encoding.UTF8.GetBytes(strText));
        return System.Convert.ToBase64String(byteText);
    }

你可能感兴趣的:(算法,.net,加密,String,C#,byte)