Encrypt/Decrypt in VB.net/SQL Server

whosbetterthanme
whosbetterthanme used Ask the Experts™
on
I have a need to allow a user to store sensetive data into a table where only they can understand the data, and no developer or admin could read it and decrypt it without a Key.

Here's how it would work:

From a VB.net app:
They enter a value they want to store (say Hello Word!) and a Key (say 123). That key is used to encrypt the data. The Hello World! data is now stored in a table in SQL as an encrypted string.

Now in order to decrypt the string into plain text so they can read it again, they would have to use the Key again (123).

How is this possible?

The reason for this is that I do not want anyone to be able to understand the data stored, but the user needs to be able to read it only if they have the Key. The Key should not be stored in code, or anywhere but entered in each time.

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Top Expert 2014
Commented:
Use the ecryption class from here. You can change it so that the key is provided by the user

http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/Q_24733910.html?sfQueryTermInfo=1+tripled

Author

Commented:
Exactly what I was looking for thanks.
Most Valuable Expert 2012
Top Expert 2014

Commented:
Glad to help :-)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial