HMAC validation using MD5 algorithm

Hi,

I am trying to implement the HMAC validation with MD5 algorithm.The proxy in the GitHub uses sha-256 algorithm to implement it. PFA the proxy which I am using currently for execution.

I am giving the algorithm in query parameter as the proxy in Git. I have also tried giving in the Java-CalcHmac-1 policy itself.

But when I try to try with md5 algorithm, I am getting an error as " error : the algorithm name (md5) is not recognized.

I noted the HMAC Callout readme as "valid algorithm arguments are: sha-1, sha1, sha-224, sha224, sha-256, sha256, sha-384, sha-256, md5, md-5".

Kindly help me with this.

Thanks in Advance.

Solved Solved
0 11 998
1 ACCEPTED SOLUTION

Harini,

I'm figuring that you are talking about the example code on this repository.

I'm sorry about the problem you experienced. I was able to reproduce the problem here.

Diagnosis: The JAR you were using is (was) out of date. It needed to be rebuilt.

I've since done that, and it eliminates the error. I've pushed updates.

You may want to pull from that repo again, to get the latest code.

View solution in original post

11 REPLIES 11

Let me have a look.

Harini,

I'm figuring that you are talking about the example code on this repository.

I'm sorry about the problem you experienced. I was able to reproduce the problem here.

Diagnosis: The JAR you were using is (was) out of date. It needed to be rebuilt.

I've since done that, and it eliminates the error. I've pushed updates.

You may want to pull from that repo again, to get the latest code.

Thank you very much Dino..I will try with the latest code.

WOW. I answered in February and you replied in September. That's a large communications latency!

Sorry Dino..I thought I have replied back..but it was missed..Thank you very much for your help..

Hi All,

How can I implement hash signature using MD5 Algorithm in Apigee.the generated signature hash should be base64 decode and further base 16 encoded in apigee can anyone plsss help me out

Apigee has HMAC functions.  I am not sure what you mean by base64 decoded and base16 encoded.  But these functions support encoding parameters. Check it out! 

https://cloud.google.com/apigee/docs/api-platform/reference/message-template-intro#hmac-functions

 

Using MD5 Algorithm I should generate hash signature the generated hash signature should be firstly base 64 decode with content type:text/xml,UTF-8,Further the obtained value should be base 16 encoded

Did you read the documentation at the link I provided?  Did you try any of the things documented there?  Does it work for you? 

Hi Dino,

Thank you but encoding of base 16 is done using hmac but base 64 decode I am not able to do i have gone through the link what you have shared