using System.Security.Cryptography;
public string AppID { get; set; }
public string ApplicationName { get; set; }
public string UserID { get; set; }
public string UserIP { get; set; }
public string AccessType { get; set; } = "ACCESS";
public string ResourceAccessed { get; set; }
public string RequestMethod { get; set; }
public string RequestHeaders { get; set; }
public int ResponseStatus { get; set; }
public long ResponseTime { get; set; }
public string SessionID { get; set; }
public string AdditionalData { get; set; }
public string UserAgent { get; set; }
public string Hostname { get; set; }
this.ApplicationName = "SusantoTest";
this.UserID = "shariyanto";
this.ResourceAccessed = "get";
this.AppID = "test-moodle";
public static void Main()
string jsonAlReq = JsonSerializer.Serialize(r) + r.AppID;
byte[] salt = new byte[16];
RandomNumberGenerator.Fill(salt);
using var sha256 = SHA256.Create();
byte[] hash = sha256.ComputeHash(Encoding.UTF8.GetBytes(Convert.ToBase64String(salt) + jsonAlReq));
Console.WriteLine(jsonAlReq);
Console.WriteLine($"{Convert.ToBase64String(salt)}.{Convert.ToBase64String(hash)}");