Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

android ecode base64

// Notice The package is android.util.Base64
import android.util.Base64;

// encoding
byte[] data = text.getBytes("UTF-8");
String base64 = Base64.encodeToString(data, Base64.DEFAULT);

// decoding
byte[] data = Base64.decode(base64, Base64.DEFAULT);
String text = new String(data, "UTF-8");
 
PREVIOUS NEXT
Tagged: #android #ecode
ADD COMMENT
Topic
Name
7+8 =