Package org.apache.nifi.encrypt
Class KeyedCipherPropertyEncryptor
java.lang.Object
org.apache.nifi.encrypt.CipherPropertyEncryptor
org.apache.nifi.encrypt.KeyedCipherPropertyEncryptor
- All Implemented Interfaces:
PropertyEncryptor
Property Encryptor implementation using AES-GCM
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static final Stringprivate final Stringprivate static final intprivate static final intprivate final SecretKeyprivate final SecureRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn object equality based on Secret Keyprivate CiphergetCipher(byte[] initializationVector, int cipherMode) protected byte[]getCipherBinary(byte[] encryptedBinary) Get Cipher Binary from encrypted binaryprotected CiphergetDecryptionCipher(byte[] encryptedBinary) Get Cipher for Decryption based on encrypted binaryprotected byte[]Get Encoded Parameters returns a random initialization vectorprotected CiphergetEncryptionCipher(byte[] encodedParameters) Get Cipher for Encryption using encoded parameters containing initialization vectorinthashCode()Return hash code based on Secret Keyprivate byte[]readInitializationVector(byte[] binary) toString()Return String containing object descriptionMethods inherited from class org.apache.nifi.encrypt.CipherPropertyEncryptor
decrypt, encrypt
-
Field Details
-
INITIALIZATION_VECTOR_LENGTH
private static final int INITIALIZATION_VECTOR_LENGTH- See Also:
-
GCM_TAG_LENGTH_BITS
private static final int GCM_TAG_LENGTH_BITS- See Also:
-
ARRAY_START
private static final int ARRAY_START- See Also:
-
CIPHER_ALGORITHM
- See Also:
-
secretKey
-
secureRandom
-
description
-
-
Constructor Details
-
KeyedCipherPropertyEncryptor
-
-
Method Details
-
getDecryptionCipher
Get Cipher for Decryption based on encrypted binary- Specified by:
getDecryptionCipherin classCipherPropertyEncryptor- Parameters:
encryptedBinary- Encrypted Binary- Returns:
- Cipher for Decryption
-
getEncryptionCipher
Get Cipher for Encryption using encoded parameters containing initialization vector- Specified by:
getEncryptionCipherin classCipherPropertyEncryptor- Parameters:
encodedParameters- Binary encoded parameters containing random initialization vector- Returns:
- Cipher for Encryption
-
getCipherBinary
protected byte[] getCipherBinary(byte[] encryptedBinary) Get Cipher Binary from encrypted binary- Specified by:
getCipherBinaryin classCipherPropertyEncryptor- Parameters:
encryptedBinary- Encrypted Binary containing cipher binary and other information- Returns:
- Cipher Binary for decryption
-
getEncodedParameters
protected byte[] getEncodedParameters()Get Encoded Parameters returns a random initialization vector- Specified by:
getEncodedParametersin classCipherPropertyEncryptor- Returns:
- Initialization Vector for encoded parameters
-
getCipher
-
readInitializationVector
private byte[] readInitializationVector(byte[] binary) -
equals
Return object equality based on Secret Key -
hashCode
public int hashCode()Return hash code based on Secret Key -
toString
Return String containing object description
-