using System.Security.Cryptography;
public static void Main()
Console.WriteLine("Hello World");
Console.WriteLine(CreateToken("xxxລ","xxx1"));
public static string CreateToken(string message, string secret)
var encoding = new System.Text.UTF8Encoding();
byte[] keyByte = encoding.GetBytes(secret);
byte[] messageBytes = encoding.GetBytes(message);
using (var hmacsha256 = new HMACSHA256(keyByte))
byte[] hashmessage = hmacsha256.ComputeHash(messageBytes);
return Convert.ToBase64String(hashmessage);