How to store and retrieve database connection pwd encrypted using c#
I have searched for an encryption method for storing and retrieving
database username and pwd in web.config. but most of the posts are
discussing only about creating a function to encrypt text but not storing
as well as retrieving it.
Is there an inbuilt function to encrypt text in c# using a password
phrase? i could not find any
now i use function given in one of the SO posts for encryption and
decryption. but i see some special characters in the encrypted text. if i
want to store the encrypted text in web.config the value should be html
compliant. please help in proceeding with the best practice here.
if any other approach please let me know both storing and retrieval scenarios
objective: store username and pwd in a connection string encrypted in
web.config ; retrieve and decrypt using the phrase i used in encryption
while trying to connect.
No comments:
Post a Comment