Ini adalah tugas sederhana untuk Kalkulasi base64 string of a HMAC SHA1 hash dengan C#.
Contoh:
Variables:
Connection ID: 5fecbc200f0e4a7cbf41040e11047e56
API Key: 2de51c4fd0f04b9fabeb95225e87da70
Calculation code:
HMACSHA1 hmac =
new HMACSHA1(UTF8Encoding.UTF8.GetBytes(apiKey.ToString("N").ToLower()));
string authentication =
Convert.ToBase64String(
hmac.ComputeHash(
UTF8Encoding.UTF8.GetBytes(connectionId.ToString("N").ToLower())));







Loading ...
