<?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 How to convert MD5 output to original values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692052#M210732</link>
    <description>&lt;P&gt;I am using MD5 function to encrypt sensitive data, How I can decrypt the data back to actual data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ex -&amp;nbsp;&lt;/P&gt;&lt;P&gt;data set_1;&lt;BR /&gt;member='Anthony';&lt;BR /&gt;member2=put(md5(member), hex32.);&lt;BR /&gt;put member2=;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Encrypted value -&amp;nbsp;&lt;/P&gt;&lt;P&gt;20F1AEB7819D7858684C898D1E98C1BB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I can convert this encrypted value back to original value.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Oct 2020 06:42:10 GMT</pubDate>
    <dc:creator>PRAVIN_JAIN</dc:creator>
    <dc:date>2020-10-16T06:42:10Z</dc:date>
    <item>
      <title>How to convert MD5 output to original values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692052#M210732</link>
      <description>&lt;P&gt;I am using MD5 function to encrypt sensitive data, How I can decrypt the data back to actual data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ex -&amp;nbsp;&lt;/P&gt;&lt;P&gt;data set_1;&lt;BR /&gt;member='Anthony';&lt;BR /&gt;member2=put(md5(member), hex32.);&lt;BR /&gt;put member2=;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Encrypted value -&amp;nbsp;&lt;/P&gt;&lt;P&gt;20F1AEB7819D7858684C898D1E98C1BB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How I can convert this encrypted value back to original value.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 06:42:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692052#M210732</guid>
      <dc:creator>PRAVIN_JAIN</dc:creator>
      <dc:date>2020-10-16T06:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert MD5 output to original values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692058#M210734</link>
      <description>&lt;P&gt;Short answer is, you can't. MD5 output for two different inputs can be the same so it is not 1-to-1 function so you can't have an inverse.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 07:15:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692058#M210734</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-10-16T07:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert MD5 output to original values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692061#M210737</link>
      <description>&lt;P&gt;This is not possible. It creates a fixed-length result for&amp;nbsp;&lt;EM&gt;any&lt;/EM&gt; input, which means it loses content. You can therefore (theoretically) find an infinity of sources resulting in the same hash.&lt;/P&gt;
&lt;P&gt;With enough computing power, you can easily find&amp;nbsp;&lt;STRONG&gt;a&lt;/STRONG&gt; solution, but not&amp;nbsp;&lt;STRONG&gt;the&lt;/STRONG&gt; solution.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 07:31:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692061#M210737</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-16T07:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert MD5 output to original values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692068#M210743</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Another important aspect for you, might be the fact, that MD5 is not safe!!!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Several weaknesses have been found. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;See: &lt;A href="https://en.wikipedia.org/wiki/MD5" target="_blank"&gt;https://en.wikipedia.org/wiki/MD5&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore you might want to switch to "a more safer" encryption algorithm, that has been implemented as a function in SAS. For example the "sha-2 (secure hash algorithm 2)":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p04sqiymw1a6unn1uvh943eudcvz.htm&amp;amp;locale=en"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p04sqiymw1a6unn1uvh943eudcvz.htm&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 08:06:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692068#M210743</guid>
      <dc:creator>FK1</dc:creator>
      <dc:date>2020-10-16T08:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert MD5 output to original values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692075#M210747</link>
      <description>&lt;P&gt;Why do you hash the value?&lt;/P&gt;
&lt;P&gt;And why do you want to revert?&lt;/P&gt;
&lt;P&gt;The only viable solution is to store the input and output pairs together.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 08:44:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692075#M210747</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2020-10-16T08:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert MD5 output to original values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692077#M210748</link>
      <description>&lt;P&gt;It depends for what you use it. Encoding of passwords, no, anonymization of data, yes.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 08:52:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692077#M210748</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-16T08:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert MD5 output to original values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692113#M210769</link>
      <description>&lt;P&gt;As pointed out earlier by several people, no way to revert. And it has to be checked where to use MD5 and where not:&lt;/P&gt;&lt;P&gt;It is easy this way to e.g. check if content of a file was modified, so you see a different MD5 value than expected. Or you want to find duplicate files, not by name but by content. Had this yesterday, so MD5 over complete folder structure and show "MD5-hash: filename", sort by hash, see &amp;gt;potential&amp;lt; duplicates. I say potential since of course you have the risk of clashes - different content produces the same hash. Rare but possible, more like the more entries you have. For this careful search to reduce what to look at, MD5 is ideal and very fast.&lt;/P&gt;&lt;P&gt;For that "clash" reason, using an MD5 to shorten concatenated strings used in table JOINs can be very risky depending on data volume. Fell into that trap once at customer site, very hard to identify if you don't know what you are looking at.&lt;/P&gt;&lt;P&gt;Finally, when hearing "reverse an MD5" or similar, first thought is always that someone tries to look at something they should not be looking at...&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 12:27:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-convert-MD5-output-to-original-values/m-p/692113#M210769</guid>
      <dc:creator>MatthiasB</dc:creator>
      <dc:date>2020-10-16T12:27:58Z</dc:date>
    </item>
  </channel>
</rss>

