//C#, Security, Crypt
public static string HashWithHMACSHA1(string secret, string toBeHashed)
{
var secretBytes = Encoding.UTF8.GetBytes(secret);
var hmac = new HMACSHA1(secretBytes);
var dataBytes = Encoding.UTF8.GetBytes(toBeHashed);
var calcHash = hmac.ComputeHash(dataBytes);
var calcHashString = Convert.ToBase64String(calcHash);
return calcHashString;
}