Encrypting & Decrypting a String in C# [duplicate]

What is the most modern (best) way of satisfying the following in C#?

string encryptedString = SomeStaticClass.Encrypt(sourceString);

string decryptedString = SomeStaticClass.Decrypt(encryptedString);

BUT with a minimum of fuss involving salts, keys, mucking about with byte[], etc.

Been Googling and confused at what I’m finding (you can see the list of similar SO Qs to see this is a deceptive question to ask).

7 Answers
7

Leave a Comment