Quantcast
Channel: SCN : All Content - Security
Viewing all articles
Browse latest Browse all 2858

HMAC SHA256 result SAP vs Java

$
0
0

Hello

 

I'm getting different HMAC code for the same input data and secret key comparing CL_ABAP_HMAC=>CALCULATE_HMAC_FOR_CHAR (using SHA256 algorithm) with result of javax.crypto.Mac (using HmacSHA256 algorithm).

 

Does anyone knows, if algorithms used by those classes are exactly the same. I would suspect that it should be that way, but as I'm getting different hash code in result for the same input I started to doubt. Or maybe I'm doing something wrong?

 

Thanks for any help

Regards,

Slawek


Viewing all articles
Browse latest Browse all 2858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>