· 9 years ago · Sep 12, 2016, 03:40 PM
1String pass = "PASSWORD";
2SecretKey secKey = new SecretKeySpec(pass.getBytes(), "AES");
3Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
4cipher.init(MODE, secKey);
5String string = new String(cipher.doFinal(ENCRYPTED_DATA);