BookmarkSubscribeRSS Feed
cherryhezy
Calcite | Level 5

Hi all, I am new to hashing/encypting data. Is there a non-reversible hashing function? I need to hash confidential customer information. I am using Enterprise Guide 7.1. Therefore functions in any version after that wouldn't be accessible for me. Thank you!

4 REPLIES 4
ballardw
Super User

See if the SHA256 function is available.

Since Enterprise Guide is not my strong point and know that the 7.versions are old-ish I'll leave it up to you to see if available.

 

Or run some code like:

data _null_;
   y=sha256('abc');
   z=sha256('access method');
   put y=$hex64.;
   put z=$hex64.;
run;

and see if you get an error. The output in the log varies depending on OS.

 

SASKiwi
PROC Star

The MD5 function is another way of hashing that is irreversible and converting it to hex makes it even harder.

MyKeyHashed = put(md5(cats('MyHashedKey',MyKeyVar)),$hex10.);

 

ChrisNZ
Tourmaline | Level 20

Enterprise Guide is a dumb interface.

It doesn't run any code.

The SAS version to which you connect from EG is what validates what you can run.

Function SHA256 has been around for a while, so you probably can run it.

andreas_lds
Jade | Level 19

What @ChrisNZ wanted to point out is, that the version of Enterprise Guide is hardly relevant when talking about functions. Important alone is the version of the executing sas-environment. You can check that version by executing

%put &=SysVLong;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 459 views
  • 1 like
  • 5 in conversation