I have searched for an encryption method for storing and retrieving database username and password 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.
I would be interested in any other approach for both storing and retrieval scenarios.