<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: HMAC SHA256 result SAP vs Java in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/hmac-sha256-result-sap-vs-java/m-p/11570126#M1937981</link>
    <description>&lt;P&gt;This was of great help !&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2019 09:13:16 GMT</pubDate>
    <dc:creator>former_member1044857</dc:creator>
    <dc:date>2019-05-09T09:13:16Z</dc:date>
    <item>
      <title>HMAC SHA256 result SAP vs Java</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hmac-sha256-result-sap-vs-java/m-p/11570124#M1937979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm getting different HMAC code for the same input data and secret key comparing CL_ABAP_HMAC=&amp;gt;CALCULATE_HMAC_FOR_CHAR (using SHA256 algorithm) with result of javax.crypto.Mac (using HmacSHA256 algorithm).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Slawek&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 13:40:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hmac-sha256-result-sap-vs-java/m-p/11570124#M1937979</guid>
      <dc:creator>former_member283466</dc:creator>
      <dc:date>2016-03-24T13:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: HMAC SHA256 result SAP vs Java</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hmac-sha256-result-sap-vs-java/m-p/11570125#M1937980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ABAP version seems to be working fine. Maybe you are just mixing types and it does not matter. E.g. on this site&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freeformatter.com/hmac-generator.html#ad-output" title="http://www.freeformatter.com/hmac-generator.html#ad-output"&gt;Free Online HMAC Generator / Checker Tool (MD5, SHA-1, SHA-256, etc.) - FreeFormatter.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can calculate HMAC-256. I did it for key = "ABC" and data = "ABC". The result is 87bed3bb8821d3196854b37290e5a1c3e518f99eff4101219d1d492fed1eba1a. To get the same value you have to first convert ABC to xstring using method STRING_TO_XSTRING. This gives you 414243. Then if you just set key to 414243 and data to ABC then the returned MAC from &lt;SPAN style="color: #333333; font-size: 12px;"&gt;CALCULATE_HMAC_FOR_CHAR is same as the one above. I did this all in SE24 just by testing the class.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Mar 2016 19:18:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hmac-sha256-result-sap-vs-java/m-p/11570125#M1937980</guid>
      <dc:creator>mvoros</dc:creator>
      <dc:date>2016-03-24T19:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: HMAC SHA256 result SAP vs Java</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/hmac-sha256-result-sap-vs-java/m-p/11570126#M1937981</link>
      <description>&lt;P&gt;This was of great help !&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 09:13:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/hmac-sha256-result-sap-vs-java/m-p/11570126#M1937981</guid>
      <dc:creator>former_member1044857</dc:creator>
      <dc:date>2019-05-09T09:13:16Z</dc:date>
    </item>
  </channel>
</rss>

