简体   繁体   中英

How to do Encryption and Decryption in Sql Server 2005

I want to encrypt and decrypt data with sql server using RSA or SHA algorithm rahter than doing it at UI.

Is it possible to do this.

Some Code Snippet will be a great help

if u need to encrpt only a string (Can't Decrypt these are One way)

u may try

HashBytes ('<algorithm>', { @input | 'input' } )<algorithm>::= MD2 | MD4 | MD5 | SHA | SHA1

ref : http://technet.microsoft.com/en-us/library/ms174415.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM