Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Encrypting a column in the Database

Status
Not open for further replies.

ko

Programmer
May 29, 2000
11
CA
Hi All<br><br>I want to encrypt the data in a column of one of the tables in the database. That column will contain the passwords for the users that will be using the application. Obviously a character datatype column.<br><br>I know user accounts can be created for all the users at the database level. But the requirement will not let me do that.<br><br>Best Regards
 
Download an OCX for data encryption and decryption from ZD-NET or I think the encryption OCX is also coming with VB 6 Enterprise edition. Just use that before committing your password or any data you want to encrypt.
 
There are other alternatives of varying hoky-ness.<br><br>One is to convert each character of the password into its ASCII number, then add all the numbers together and store that.&nbsp;&nbsp;When you go to validate the user's password, you'll just be verifying that the sum of the entered password's ASCII values = the stored value in the user's record.<br><br>Or you could use the REVERSE() function - pretty easy to decrypt, obviously.<br><br>In VFP there is a function STRTRAN() than can be used to easily replace one character with another.&nbsp;&nbsp;Its hardly bullet-proof encryption, but you could probably write a stored procedure to do it without too much trouble (until SQLS2000 and UDFs). <p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br>
 
Is there an input mask property present in SQL Server7.0 that can help me in converting a character column to look like '******'. <br><br>Regards
 
ko,<br><br>Have you tried what I told you earlier. Use ActiveX to encrypte data before commiting. if you can not find that ActiveX please email me I will send you that and advise you the procedure. My email address is <A HREF="mailto:hariskhan_us@yahoo.com">hariskhan_us@yahoo.com</A><br><br>There is another way to encrypt your sql data. There is a function in SQL 7.0 encrypt(&quot;your data&quot;) will return you encrypted data. These are the two approches which ever you like use it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top