Wednesday, November 24, 2010

Password encryption

Many a times we come across a situation where we may need to encrypt the password which we use in the SAS programs (Example: Using a password to access a database like db2). This can be acheived by the pwencode procedure. See the example below:

filename fileref "C:\MyFolder\Pwd.txt";
proc pwencode in="My Passwd" out=fileref;

The contents of the Pwd.tx is as follows:

Here the {sas001} denotes the method of encryption. More information on the encryption methods available/used in SAS can be found at:

Now the encoded password can be used everywhere by reading the contents of the file Pwd.txt.


  1. This is the most common method that most of the people uses to secure information. I am looking for some advanced methods which are used to secure information online.

  2. You can use SAS PWDECODE to decrypt your password, e.g.{sas001}TXkgUGFzc3dk

  3. Great article, thanks. This is a tad outdated, now, though, since blowfish has a huge security hole. The recommendation is to use blowfish2 as long as you're using vim 7.4.399 or later.


  4. This website can live streaming , you can join at my site :
    agen judi online terpercaya
    Prediksi Bola

    Thank you