<?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: Problem with the sha256() function in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598087#M16248</link>
    <description>&lt;P&gt;The full hash value should always be there in the table, this is just a display issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comparisons using program code will compare the full hash values held, not the values displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 11:33:44 GMT</pubDate>
    <dc:creator>Amir</dc:creator>
    <dc:date>2019-10-21T11:33:44Z</dc:date>
    <item>
      <title>Problem with the sha256() function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598060#M16237</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below, my data step :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; test;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;length&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; c2 $ &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;64&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt; c1 $ &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;64&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; c2 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$hex64.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; c1 &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;$hex64.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;c1=sha256(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'8811421'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;c2=sha256(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'8811531'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;I don't understand why c1 is null while c2 is ok.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;C2 = 327B1D31BCEC3EAF555B0FB984ABFBC21C564E7D7B4C21D032DE47E62534BB12&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Can you help me ?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;Thanks,&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 09:38:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598060#M16237</guid>
      <dc:creator>Charlotte37</dc:creator>
      <dc:date>2019-10-21T09:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the sha256() function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598078#M16244</link>
      <description>&lt;P&gt;There must an error in your code, please check the log. When i execute the data-step you posted (two put-statements added), i get:&lt;/P&gt;
&lt;PRE&gt;c1=005CF1E3EAA9EF7AC87EDA95C3EED5752D273FA165519753A37A855D7DBE8B7E
c2=327B1D31BCEC3EAF555B0FB984ABFBC21C564E7D7B4C21D032DE47E62534BB12&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Oct 2019 10:52:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598078#M16244</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-10-21T10:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the sha256() function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598082#M16245</link>
      <description>&lt;P&gt;It might be a display issue, as per:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/SHA256-does-not-generate-the-same-length-of-encryption/td-p/367265" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/SHA256-does-not-generate-the-same-length-of-encryption/td-p/367265&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As can be seen in the response from&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt;&amp;nbsp;to your post, c1 starts with 00, which is also highlighted in the link above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try putting the values to the log, rather than viewing the data set and see if that helps, as per the link.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 11:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598082#M16245</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2019-10-21T11:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the sha256() function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598084#M16246</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for your feedback. Indeed, with a "Put", I see my hash key&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Oct 2019 11:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598084#M16246</guid>
      <dc:creator>Charlotte37</dc:creator>
      <dc:date>2019-10-21T11:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the sha256() function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598085#M16247</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I use the hash key in 2 tables to compare and find differences between the tables.&lt;BR /&gt;How to make the join between the 2 tables on the hash key if sometimes she is empty?&lt;BR /&gt;</description>
      <pubDate>Mon, 21 Oct 2019 11:26:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598085#M16247</guid>
      <dc:creator>Charlotte37</dc:creator>
      <dc:date>2019-10-21T11:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the sha256() function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598087#M16248</link>
      <description>&lt;P&gt;The full hash value should always be there in the table, this is just a display issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Comparisons using program code will compare the full hash values held, not the values displayed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 11:33:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598087#M16248</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2019-10-21T11:33:44Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the sha256() function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598146#M16256</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/296082"&gt;@Charlotte37&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BR /&gt;I use the hash key in 2 tables to compare and find differences between the tables.&lt;BR /&gt;How to make the join between the 2 tables on the hash key if sometimes she is empty?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to underline what &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/22588"&gt;@Amir&lt;/a&gt; already said: the value is the table, and joining/merging etc. work as intended. Can you show as the code not generating the expected result? If the lengths of the variables you use in sha256 are not the same, you will get different results, even if the shown values are the same - in sas all char-variables are padded with blanks. To avoid this, use&lt;/P&gt;
&lt;PRE&gt;hash = sha256(trim(original));&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Oct 2019 14:16:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598146#M16256</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-10-21T14:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the sha256() function</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598209#M16264</link>
      <description>Thanks</description>
      <pubDate>Mon, 21 Oct 2019 18:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Problem-with-the-sha256-function/m-p/598209#M16264</guid>
      <dc:creator>Charlotte37</dc:creator>
      <dc:date>2019-10-21T18:35:29Z</dc:date>
    </item>
  </channel>
</rss>

