class EncryptingSerializerDeserializer implements SerializerDeserializer {

  @Override
  public Object deserialize(byte[] data) {
    byte[] decrypted;
    try {
      Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
      byte[] iv = new byte[16];
      System.arraycopy(data, 0, iv, 0, iv.length);
      cipher.init(Cipher.DECRYPT_MODE, secretKey, new IvParameterSpec(iv));
      decrypted = cipher.doFinal(data, iv.length, data.length-iv.length);
    } catch (Exception e) { // NOSONAR
      throw new IllegalStateException(e);
    }
    return wrapped.deserialize(decrypted);
  }

  public  EncryptingSerializerDeserializer();
  public  EncryptingSerializerDeserializer(SerializerDeserializer wrapped);

}