Encode and decode a string using Android Base64

String message = "The original message in plain text"; String encodedMessage = Base64.encodeToString(message.getBytes(), Base64.DEFAULT); String decodedMessage = new String(Base64.decode(message, Base64.DEFAULT));
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.