<?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: Unhashing a value in SAS for hash256 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Unhashing-a-value-in-SAS-for-hash256/m-p/744130#M233074</link>
    <description>&lt;P&gt;In a sense, hashing is some kind encryption. It's not meant to be reversed.&lt;/P&gt;
&lt;P&gt;So before deciding to hashing values, you need to think of the consequences of doing so. Perhaps you need to store the original and hashed value pair somewhere (in a secure location if security is the reason to hash).&lt;/P&gt;</description>
    <pubDate>Thu, 27 May 2021 12:46:06 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2021-05-27T12:46:06Z</dc:date>
    <item>
      <title>Unhashing a value in SAS for hash256</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unhashing-a-value-in-SAS-for-hash256/m-p/744127#M233073</link>
      <description>&lt;P&gt;Dear Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Good morning. I want to unhash these dummy SSNs data. Could you please give me suggestions? I have the following sample program.&amp;nbsp; I want to know how I can unhash the HASH_SSN variable in data two?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;

input ID :$ SSN $9. ;
CARDS;
SAM 567457869
SMITH 897845678
SONY 003457896
;
RUN;

DATA TWO;
	SET ONE;
HASH_SSN=upcase(put(sha256(strip(SSN)||"e8pZqXwS0R"),$hex64.)) ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 May 2021 12:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unhashing-a-value-in-SAS-for-hash256/m-p/744127#M233073</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2021-05-27T12:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Unhashing a value in SAS for hash256</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unhashing-a-value-in-SAS-for-hash256/m-p/744130#M233074</link>
      <description>&lt;P&gt;In a sense, hashing is some kind encryption. It's not meant to be reversed.&lt;/P&gt;
&lt;P&gt;So before deciding to hashing values, you need to think of the consequences of doing so. Perhaps you need to store the original and hashed value pair somewhere (in a secure location if security is the reason to hash).&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 12:46:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unhashing-a-value-in-SAS-for-hash256/m-p/744130#M233074</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2021-05-27T12:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unhashing a value in SAS for hash256</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Unhashing-a-value-in-SAS-for-hash256/m-p/744159#M233090</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH&lt;/a&gt;&amp;nbsp;said, you can't reverse the hash &lt;STRIKE&gt;code&lt;/STRIKE&gt; function.&amp;nbsp; If there were such a thing, what would be the point of the hash function in the first place?&amp;nbsp; It would no longer be providing any sort of privacy protection.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But if you have your population of ssn's somewhere, you could reapply the hash function to create a map between the encrypted and original values.&amp;nbsp; Then you could use that as a reverse lookup table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 May 2021 14:27:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Unhashing-a-value-in-SAS-for-hash256/m-p/744159#M233090</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-05-27T14:27:13Z</dc:date>
    </item>
  </channel>
</rss>

