Does anyone know how to decode and encode a string in Base64 using the Base64. I am using the following code, but it\'s not working.
String source = \"passwo
To encrypt:
byte[] encrpt= text.getBytes("UTF-8"); String base64 = Base64.encodeToString(encrpt, Base64.DEFAULT);
To decrypt:
byte[] decrypt= Base64.decode(base64, Base64.DEFAULT); String text = new String(decrypt, "UTF-8");