C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » Databases »

Encryption and Comparison of Data in SQL Server 2000


Posted Date: 06 Oct 2008    Resource Type: Articles    Category: Databases
Author: VigneshMember Level: Silver    
Rating: 1 out of 5Points: 5



Encryption of data is the order of the day. Encryption does not mean that you purchase 3rd party tools to secure your data. We can use sheer coding to perform encryption for smaller applications.

Currently there are 2 undocumented functions for encryption of data and to compare normal data with encrypted one. The risk with undocumented functions is that the inputs to the function can be modified anytime or the function can altogether be scraped from future releases. So developers are advised not to bank heavily on these undocumented functions. This post is just a knowhow of these simple encryption techniques.

The functions are,
pwdencrypt
pwdcompare

pwdencrypt:
----------
For a given varchar input this function returns a password hash. A password hash is an encrypted string that cannot be decrypted. It is a one way encryption.

The sample code goes like this,

SELECT pwdencrypt(Column1) FROM #TEMP

Pwdcompare:
----------
The 2 inputs for this function are clear text string and the varbinary hash password. This function returns 1 if they match and 0 if they don’t.

SELECT pwdcompare(Column1,Column2) FROM #TEMP




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
SQL  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: DBCC FreeProcCache & DBCC DROPCLEANBUFFERS
Previous Resource: difference between MSSQL and MYSQL
Return to Discussion Resource Index
Post New Resource
Category: Databases


Post resources and earn money!
 
Related Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use