This is how I did in POJO. Could somebody help me how to do it with
CXF configuration?


String password = "1234567890123456";
String content = “abcdefghigklmnopqrstuvwxyz0123456789”;

byte[] raw = password.getBytes(Charsets.UTF_8);
SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, skeySpec, new IvParameterSpec(new
byte[16])); // zero IV
String encrypted = new
String(Base64.encodeBase64(cipher.doFinal(content.getBytes(Charsets.UTF_8))))

Reply via email to