I am trying to make use of a REST API using C#.
The API creator has provided below pseudo code for hmac creation.
var key1 = sha1(body); var key2 = key1 . SECRET_KEY; var key3 = sha1(key2); var signature = base64_encode(key3); In the above pseudo code , body is html request body string , and SECRET_KEY is the secret key provided by REST API provider.
As per my knowledge , I need to use System.Security.Cryptography.HMACSHA1 class to implement this.
But am not able to completely implement above logic in C#.
Any suggestions ?