public interface RepositoryObjectBlockEncryptor extends RepositoryObjectEncryptor
RepositoryObjectStreamEncryptor.| Modifier and Type | Method and Description |
|---|---|
byte[] |
decrypt(byte[] encryptedRecord,
String recordId)
Decrypts the provided byte[] (an encrypted record with accompanying metadata).
|
byte[] |
encrypt(byte[] plainRecord,
String recordId,
String keyId)
Encrypts the serialized byte[].
|
String |
getNextKeyId()
Returns a valid key identifier for this encryptor (valid for encryption and decryption) or throws an exception if none are available.
|
void |
initialize(KeyProvider keyProvider)
Initializes the encryptor with a
KeyProvider. |
void initialize(KeyProvider keyProvider) throws KeyManagementException
KeyProvider.initialize in interface RepositoryObjectEncryptorkeyProvider - the key provider which will be responsible for accessing keysKeyManagementException - if there is an issue configuring the key providerbyte[] encrypt(byte[] plainRecord,
String recordId,
String keyId)
throws EncryptionException
plainRecord - the plain record, serialized to a byte[]recordId - an identifier for this record (eventId, generated, etc.)keyId - the ID of the key to useEncryptionException - if there is an issue encrypting this recordbyte[] decrypt(byte[] encryptedRecord,
String recordId)
throws EncryptionException
encryptedRecord - the encrypted record in byte[] formrecordId - an identifier for this record (eventId, generated, etc.)EncryptionException - if there is an issue decrypting this recordString getNextKeyId() throws KeyManagementException
KeyManagementException - if no available key IDs are valid for both operationsCopyright © 2020 Apache NiFi Project. All rights reserved.