<?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 Hello, in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-calculate-SHA-for-unsigned-int-instead-of-string-with/m-p/1153573#M26386</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for your question. I will investigate it and get back to you soon.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;</description>
    <pubDate>Tue, 06 Nov 2018 08:31:57 GMT</pubDate>
    <dc:creator>Alice_H_Intel</dc:creator>
    <dc:date>2018-11-06T08:31:57Z</dc:date>
    <item>
      <title>How to calculate SHA for unsigned int instead of string with ippcp</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-calculate-SHA-for-unsigned-int-instead-of-string-with/m-p/1153572#M26385</link>
      <description>&lt;P&gt;I am trying to calculate SHA256 and SHA384 for message of type unsigned integer, but from the&amp;nbsp;Intel® Integrated Performance&lt;BR /&gt;Primitives Cryptography&amp;nbsp;Developer Reference I see that all the relevant functions receive only pointer to octet string (Ipp8u*) as message.&lt;/P&gt;&lt;P&gt;How can I use it with pointer to unsigned int message&amp;nbsp;(Ipp32u and Ipp64u)?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2018 07:17:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-calculate-SHA-for-unsigned-int-instead-of-string-with/m-p/1153572#M26385</guid>
      <dc:creator>Sapir_R_Intel</dc:creator>
      <dc:date>2018-11-05T07:17:55Z</dc:date>
    </item>
    <item>
      <title>Hello,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-calculate-SHA-for-unsigned-int-instead-of-string-with/m-p/1153573#M26386</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for your question. I will investigate it and get back to you soon.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 08:31:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-calculate-SHA-for-unsigned-int-instead-of-string-with/m-p/1153573#M26386</guid>
      <dc:creator>Alice_H_Intel</dc:creator>
      <dc:date>2018-11-06T08:31:57Z</dc:date>
    </item>
    <item>
      <title>Hello!</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-calculate-SHA-for-unsigned-int-instead-of-string-with/m-p/1153574#M26387</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Actually, Ipp32u is just 4 bytes or 4 Ipp8u and all that we need to do is to represent Ipp32u as an array of Ipp8u elements and pass it to the hashing method.&lt;/P&gt;&lt;P&gt;This can be done in two ways:&lt;/P&gt;&lt;P&gt;1) Manually convert Ipp32u to 4 Ipp8u to ensure consistent &lt;A href="https://en.wikipedia.org/wiki/Endianness"&gt;endianness&lt;/A&gt; across all available architectures&lt;/P&gt;&lt;P&gt;For example, Ipp32u to 4 Ipp8u BigEndian conversion (8, 16, 24 are bits offsets):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="BigEndian.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/10354i1CB83A952F06DAFD/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="BigEndian.png" alt="BigEndian.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2) Rely on existing endianness. This way is less portable, but much easier:&lt;/P&gt;&lt;P&gt;Simply create an Ipp8u pointer and set it to Ipp32u address - Ipp8u* ptr = (Ipp8u*)&amp;amp;ipp32uVariable (length = 4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To hash an array of Ipp32u's, each of them should be converted with method #1 or reinterpreted pointer on the beginning can be used: Ipp8u* ptr = (Ipp8u*)sourceIpp32uArray. Resulting array will have x4 length.&lt;/P&gt;&lt;P&gt;Also, you can check endianness at compilation time and&amp;nbsp;use faster and easier #2 or #1 depending on the detected value.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Yuriy&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 12:54:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/How-to-calculate-SHA-for-unsigned-int-instead-of-string-with/m-p/1153574#M26387</guid>
      <dc:creator>Yuriy_N_Intel</dc:creator>
      <dc:date>2018-11-16T12:54:55Z</dc:date>
    </item>
  </channel>
</rss>

