<?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: Need help to hash a number in hadoop using SHA256 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-hash-a-number-in-hadoop-using-SHA256/m-p/697465#M213141</link>
    <description>&lt;P&gt;The sha256 value occupies 64 bytes in hex format. So whatever you add after is dropped off since you restrict the length to 64.&lt;/P&gt;
&lt;P&gt;Like this?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;hash_number=put(sha256(strip(number),$hex64.))||"d8pyrtuc0q";&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 08 Nov 2020 21:19:24 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-11-08T21:19:24Z</dc:date>
    <item>
      <title>Need help to hash a number in hadoop using SHA256</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-hash-a-number-in-hadoop-using-SHA256/m-p/697253#M213068</link>
      <description>&lt;P&gt;I am running a code in hadoop using PROC SQL passthrough in SAS. I have a number to hash to use in hadoop/hive. My SAS code is not working. Could someone help me write this in hadoop sql?&lt;/P&gt;&lt;P&gt;I need a code in hadoop sql syntax equivalent to put(sha256(strip(number)||"d8pyrtuc0q"),$hex64.) ?&lt;/P&gt;&lt;P&gt;example of SAS code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lang-sql s-code-block hljs"&gt;&lt;CODE&gt;data one;
input number $10. ;
hash_number=put(sha256(strip(number)||"d8pyrtuc0q"),$hex64.);
cards;
123456789
9876543210
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The result looks like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lang-sql s-code-block hljs"&gt;&lt;CODE&gt;NUMBER      HASH_NUMBER
123456789   F35721F6CC13511F1BC0DE3D0B91287F4C41BF110026707BFEBC671EA32308F7
9876543210  6EAA2E945E25C109563FA1A533E9EC9710C34339710F6A463E2AD30BC528F7BC&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Thanks in advance&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Nov 2020 21:42:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-hash-a-number-in-hadoop-using-SHA256/m-p/697253#M213068</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2020-11-06T21:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to hash a number in hadoop using SHA256</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-hash-a-number-in-hadoop-using-SHA256/m-p/697465#M213141</link>
      <description>&lt;P&gt;The sha256 value occupies 64 bytes in hex format. So whatever you add after is dropped off since you restrict the length to 64.&lt;/P&gt;
&lt;P&gt;Like this?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;hash_number=put(sha256(strip(number),$hex64.))||"d8pyrtuc0q";&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 21:19:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-hash-a-number-in-hadoop-using-SHA256/m-p/697465#M213141</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-08T21:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to hash a number in hadoop using SHA256</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Need-help-to-hash-a-number-in-hadoop-using-SHA256/m-p/697466#M213142</link>
      <description>&lt;P&gt;As for native HQL, why don't you look up the HQL functions?&lt;/P&gt;
&lt;P&gt;Here, you need function sha2() and hex().&lt;/P&gt;</description>
      <pubDate>Sun, 08 Nov 2020 21:28:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Need-help-to-hash-a-number-in-hadoop-using-SHA256/m-p/697466#M213142</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-11-08T21:28:05Z</dc:date>
    </item>
  </channel>
</rss>

