abstract class CipherPropertyEncryptor extends Object implements PropertyEncryptor
| Modifier and Type | Field and Description |
|---|---|
private static Charset |
PROPERTY_CHARSET |
| Constructor and Description |
|---|
CipherPropertyEncryptor() |
| Modifier and Type | Method and Description |
|---|---|
String |
decrypt(String encryptedProperty)
Decrypt property from a hexadecimal string
|
String |
encrypt(String property)
Encrypt property and encode as a hexadecimal string
|
protected abstract byte[] |
getCipherBinary(byte[] encryptedBinary)
Get Cipher Binary from encrypted binary
|
private byte[] |
getDecodedBinary(String encryptedProperty) |
protected abstract Cipher |
getDecryptionCipher(byte[] encryptedBinary)
Get Cipher for Decryption based on encrypted binary
|
protected abstract byte[] |
getEncodedParameters()
Get Encoded Parameters based on cipher implementation
|
protected abstract Cipher |
getEncryptionCipher(byte[] encodedParameters)
Get Cipher for Encryption using encoded parameters
|
private static final Charset PROPERTY_CHARSET
public String encrypt(String property)
encrypt in interface PropertyEncryptorproperty - Property value to be encryptedpublic String decrypt(String encryptedProperty)
decrypt in interface PropertyEncryptorencryptedProperty - Encrypted property value to be decipheredprivate byte[] getDecodedBinary(String encryptedProperty)
protected abstract byte[] getEncodedParameters()
protected abstract Cipher getEncryptionCipher(byte[] encodedParameters)
encodedParameters - Binary encoded parametersprotected abstract Cipher getDecryptionCipher(byte[] encryptedBinary)
encryptedBinary - Encrypted Binaryprotected abstract byte[] getCipherBinary(byte[] encryptedBinary)
encryptedBinary - Encrypted Binary containing cipher binary and other informationCopyright © 2023 Apache NiFi Project. All rights reserved.