using System.Security.Cryptography;
public static void Main()
var encoding = new System.Text.UTF8Encoding();
byte[] keyByte = encoding.GetBytes("cc05bcdeaae512cfd8f046cba2dda03358c5a3061324760057155ec2beb80cd6");
byte[] messageBytes = encoding.GetBytes("I am kunal");
using (var hmacsha256 = new HMACSHA256(keyByte))
byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);
Console.Write(Convert.ToBase64String(hashmessage));
Console.Write(Convert.ToBase64String(hashmessage).Replace('+', '-').Replace('/', '_'));