Solved

c# how can I encrypt/decrypt a string to save into sql.

Posted on 2007-03-23
3
1,254 Views
Last Modified: 2008-10-29
How can I encrypt data and send it into sql for storage...then later query that data decrypt it and present the value.

I dont mean I need to know who to read and write from SQL..but rather how can I encrypt say a string value so I can save teh encrypted value to a table..then later decrypt that same value aftre retriveing it from the database.

I need a c# solution. Either code or at least a document that explains how to do this. I am NOT talking about encryption teh web config connection string...

0
Comment
Question by:Prysson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 23

Assisted Solution

by:Jens Fiederer
Jens Fiederer earned 50 total points
ID: 18781203
The normal Microsoft documentation for the CryptoStream class gives you a pretty good example (code), as well as detailed information.
0
 
LVL 4

Accepted Solution

by:
g_johnson earned 450 total points
ID: 18782185
0
 

Expert Comment

by:manjunathcv
ID: 22829640
i recently came across this situation and  here is the sample code

http://probedeep.blogspot.com/2008/10/simple-password-string-encryption-and.html
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question