HMACSHA1+Base64加密
public static string HMACSHA1(this string text, string secretKey)
{
HMACSHA1 hmacsha1 = new HMACSHA1();
hmacsha1.Key = Encoding.UTF8.GetBytes(secretKey);
byte[] dataBuffer = Encoding.UTF8.GetBytes(text);
byte[] hashBytes = hmacsha1.ComputeHash(dataBuffer);
var s = Convert.ToBase64String(hashBytes);
Convert.ToBase64CharArray(");
return s;
}