Java tutorial
//package com.java2s; import android.util.Base64; public class Main { public static String encode(String str, int time) { String result = new String(str); for (int i = 0; i < time; i++) { result = new String(Base64.encode(result.getBytes(), Base64.NO_WRAP)); } return result; } }