Answers for "convert to base64 c#"

C#
13

convert to base64 c#

public static string Base64Encode(string plainText) {
  var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
  return System.Convert.ToBase64String(plainTextBytes);
}
Posted by: Guest on April-27-2020
1

convert base64 string to string c#

byte[] data = Convert.FromBase64String(encodedString);
string decodedString = Encoding.UTF8.GetString(data);
Posted by: Guest on June-19-2020
8

convert to base64 c#

public static string Base64Decode(string base64EncodedData) {
  var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
  return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
}
Posted by: Guest on April-27-2020
0

base64decode C#

string base64Encoded = "your-encoded-text";
string base64Decoded;
byte[] data = System.Convert.FromBase64String(base64Encoded);
base64Decoded = System.Text.ASCIIEncoding.ASCII.GetString(data);
Posted by: Guest on December-23-2020
0

C# Base64 Encode

public static string Base64Encode(string plainText) {
  var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText);
  return System.Convert.ToBase64String(plainTextBytes);
}
Posted by: Guest on February-02-2021
0

C# Base64 Decode

public static string Base64Decode(string base64EncodedData) {
  var base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData);
  return System.Text.Encoding.UTF8.GetString(base64EncodedBytes);
}
Posted by: Guest on August-10-2021

C# Answers by Framework

Browse Popular Code Answers by Language