private byte[] encrypt(byte[] serialized, String eventId) throws IOException, EncryptionException { String keyId = getKeyId(); try { return provenanceEventEncryptor.encrypt(serialized, eventId, keyId); } catch (Exception e) { logger.error("Encountered an error: ", e); throw new EncryptionException(e); } }