Link to home
Create AccountLog in
Avatar of whosbetterthanme
whosbetterthanmeFlag for United States of America

asked on

Encrypt/Decrypt in VB.net/SQL Server

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.

ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of whosbetterthanme

ASKER

Exactly what I was looking for thanks.
Glad to help :-)