public static string encryptByHMACSHA1(string input, string key)
{
HMACSHA1 hmac = new HMACSHA1(System.Text.Encoding.UTF8.GetBytes(key));
byte[] stringBytes = Encoding.UTF8.GetBytes(input);
byte[] hashedValue = hmac.ComputeHash(stringBytes);
return encodeToBase64(hashedValue);
}