something like
String source = "password";
byte[] byteArray;
try {
byteArray = source.getBytes("UTF-16");
System.out.println(new String(Base64.decode(Base64.encode(byteArray,
Base64.DEFAULT), Base64.DEFAULT)));
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}