Android examples for File Input Output:Base64
Encode Password String by base64
//package com.java2s; import android.util.Base64; public class Main { public static String EncodeString(String password) { //encoding string using Base64 encoder byte[] encodedBytes = Base64.encode(password.getBytes(), Base64.DEFAULT);/*from www. j a v a 2 s . c om*/ return new String(encodedBytes); } }