using System.Security.Cryptography;
using System.Text;using System.Linq;
public static void Main()
Console.WriteLine(ToHMAC_SHA_Encrypted("123456"));
public static string ToHMAC_SHA_Encrypted( string text)
var hmacSha = new HMACSHA1();
byte[] hmac = hmacSha.ComputeHash(Encoding.UTF8.GetBytes(text));
return Encoding.UTF8.GetString(hmac);