Hi,
If I have to build a web service from bpmonline through an api which requires the method signature to be generated by taking the query string, and creating a HMAC-SHA256 signature using your API key as the secret key.
Is there a way to do that?
There is available a sample c# code, if that helps.
Generating the method signature
<span>private</span> <span>static</span> <span>string</span> <span>GetSignature</span><span>(</span><span>string</span> <span>args</span><span>,</span> <span>string</span> <span>privatekey</span><span>)</span>
<span>{</span>
<span>var</span> <span>encoding</span> <span>=</span> <span>new</span> <span>System</span><span>.</span><span>Text</span><span>.</span><span>UTF8Encoding</span><span>();</span>
<span>byte</span><span>[]</span> <span>key</span> <span>=</span> <span>encoding</span><span>.</span><span>GetBytes</span><span>(</span><span>privatekey</span><span>);</span>
<span>var</span> <span>myhmacsha256</span> <span>=</span> <span>new</span> <span>HMACSHA256</span><span>(</span><span>key</span><span>);</span>
<span>byte</span><span>[]</span> <span>hashValue</span> <span>=</span> <span>myhmacsha256</span><span>.</span><span>ComputeHash</span><span>(</span><span>encoding</span><span>.</span><span>GetBytes</span><span>(</span><span>args</span><span>));</span>
<span>string</span> <span>hmac64</span> <span>=</span> <span>Convert</span><span>.</span><span>ToBase64String</span><span>(</span><span>hashValue</span><span>);</span>
<span>myhmacsha256</span><span>.</span><span>Clear</span><span>();</span>
<span>return</span> <span>hmac64</span><span>;</span>
<span>}</span>
<span>I am trying to integrate with </span>
https://apidocs.unleashedsoftware.com/AuthenticationHelp