Encode and decode a string using Android Base64

1
2
String message = "The original message in plain text";
String encodedMessage = Base64.encodeToString(message.getBytes(), Base64.DEFAULT);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Encode and decode a simple Java String using Base64.

#java #android #decode #encode #string

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.