private byte[] decrypt(byte[] encryptedBytes, String eventId) throws IOException, EncryptionException { try { return provenanceEventEncryptor.decrypt(encryptedBytes, eventId); } catch (Exception e) { logger.error("Encountered an error: ", e); throw new EncryptionException(e); } }
private String getNextAvailableKeyId() throws KeyManagementException { return provenanceEventEncryptor.getNextKeyId(); }
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); } }
provenanceEventEncryptor.initialize(keyProvider); } catch (KeyManagementException e) { String msg = "Encountered an error building the key provider";