LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (October 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 22 Oct 2008 21:23:04 -0500
Reply-To:     "./ ADD NAME=Data _null_," <iebupdte@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "./ ADD NAME=Data _null_," <iebupdte@GMAIL.COM>
Subject:      Re: Masking a particular field (SAS 9.1.3)
Comments: To: Lou <lpogoda@hotmail.com>
In-Reply-To:  <gdoi5d$if4$1@aioe.org>
Content-Type: text/plain; charset=ISO-8859-1

Have you never heard of HEX format. The value is irrelevant. The point is to code it. It seems no different from assigning random numbers or any other arbitrarily coded value.

1183 data _null_; 1184 do subjid = '10011','20011','31113'; 1185 md5 = md5(subjid); 1186 put 'NOTE: ' subjid= md5=hex32.; 1187 end; 1188 run;

NOTE: subjid=10011 md5=A2369958A9645EAC52B58A8134E2EF5A NOTE: subjid=20011 md5=AC09BDC10C90D57BD2D9117485CE3FA7 NOTE: subjid=31113 md5=E5C1744E18EE06806B928A7B9129435F

On 10/22/08, Lou <lpogoda@hotmail.com> wrote: > ""./ ADD NAME=Data _null_,"" <iebupdte@GMAIL.COM> wrote in message > news:ce1fb7450810220428g63d390a0q8bd2ef19ed139e4f@mail.gmail.com... > > MD5 function does "something" in version 9.1. See if this works on > > your computer. > > > > data md5; > > ver = sasver(); > > do id = '100101','100121'; > > id5 = md5(id); > > output; > > end; > > run; > > proc print; > > run; > > Well, it does "something" on my computer as well, but I don't quite see the > point - the resulting string isn't "typable" from the normal keyboad unless > you happen to know ascii code and type with the Alt key and the numeric > keypad. > > And even if it was, you can't undo it, should the need arise, without using > some sort of conversion table or a brute force search. If you could, MD5 > would be the best compression algorithm yet - take any file and reduce it to > a checksum 32 hexadecimal digits long. > > I'd suggest that if you're going to need a conversion table anyway, forget > about hashing the id, and in any case produce something humanly legible. > > > > > On 10/22/08, Anindya Mozumdar <anindya.lugbang@gmail.com> wrote: > > > All, > > > I have a dataset which contains a field for identifying a > > > customer, say cust_id. I need to mask the cust_id (before I send it > > > out of the company to be used by someone else) so that I have a unique > > > masked value for each cust_id. I thought a simple hash function would > > > work, but there does not seem to be any in SAS 9.1.3 - I am aware of > > > md5 in SAS 9.2. Is there are any easy way to do this in 9.1.3, without > > > thinking about a masking logic of my own? Thanks in advance. > > > Regards, > > > Anindya > > > >


Back to: Top of message | Previous page | Main SAS-L page