How do I return a base64 encoded string given a string?
How do I decode a base64 encoded string into a string?
One liner code:
Note: Use System and System.Text directives.
System
System.Text
Encode:
string encodedStr = Convert.ToBase64String(Encoding.UTF8.GetBytes("inputStr"));
Decode:
string inputStr = Encoding.UTF8.GetString(Convert.FromBase64String(encodedStr));