Base64 Encode and Decode

Here is an example how to encode and decode a string from and to base64:

Encode

String encoded = Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(sourceString));

Decode

String decoded = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(sourceString));

Werbung



comments powered by Disqus

Copyright Dunkel & Iwer GbR | Datenschutzerklärung | Impressum