Hi
On 11/02/15 12:03, Christopher Cheng wrote:
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))))

Are you trying to do JWE by any chance ?
I'll post you a code example shortly, working with a release issue right now

Sergey

Reply via email to