public static void Main()
Console.WriteLine(GetUserIdentityHash(123) == "4839c3ddf0b2d28b26ee9d6ba9e46701e7e46ce57ccc518ffc70f33274edc18e");
public static string GetUserIdentityHash(int userId) {
byte[] secretKey = System.Text.Encoding.UTF8.GetBytes("SA6ZOZZRbxpbyjeLlH5uY-yhXeGQa72utowzM7XD");
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(userId.ToString());
using (var hmac = new System.Security.Cryptography.HMACSHA256(secretKey))
return String.Concat(hmac.Hash.Select(x => x.ToString("x2")));