Encoding and decoding base64 data (XAML)
The following example shows how to perform Base64 encoding and decoding.
public void EncodeDecodeBase64()
{
// Define a Base64 encoded string.
String strBase64 = "uiwyeroiugfyqcajkds897945234==";
// Decoded the string from Base64 to binary.
IBuffer buffer = CryptographicBuffer.DecodeFromBase64String(strBase64);
// Encode the buffer back into a Base64 string.
String strBase64New = CryptographicBuffer.EncodeToBase64String(buffer);
}