class KeyedCipherPropertyEncryptor extends CipherPropertyEncryptor
| Modifier and Type | Field and Description |
|---|---|
private static int |
ARRAY_START |
private KeyedCipherProvider |
cipherProvider |
private static boolean |
DECRYPT |
private String |
description |
private static boolean |
ENCRYPT |
private EncryptionMethod |
encryptionMethod |
private static int |
INITIALIZATION_VECTOR_LENGTH |
private SecretKey |
secretKey |
private SecureRandom |
secureRandom |
| Modifier | Constructor and Description |
|---|---|
protected |
KeyedCipherPropertyEncryptor(KeyedCipherProvider cipherProvider,
EncryptionMethod encryptionMethod,
SecretKey secretKey) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
Return object equality based on Encryption Method and Secret Key
|
private Cipher |
getCipher(byte[] initializationVector,
boolean encrypt) |
protected byte[] |
getCipherBinary(byte[] encryptedBinary)
Get Cipher Binary from encrypted binary
|
protected Cipher |
getDecryptionCipher(byte[] encryptedBinary)
Get Cipher for Decryption based on encrypted binary
|
protected byte[] |
getEncodedParameters()
Get Encoded Parameters returns a random initialization vector
|
protected Cipher |
getEncryptionCipher(byte[] encodedParameters)
Get Cipher for Encryption using encoded parameters containing initialization vector
|
int |
hashCode()
Return hash code based on Encryption Method and Secret Key
|
private byte[] |
readInitializationVector(byte[] binary) |
String |
toString()
Return String containing object description
|
decrypt, encryptprivate static final int INITIALIZATION_VECTOR_LENGTH
private static final int ARRAY_START
private static final boolean ENCRYPT
private static final boolean DECRYPT
private final KeyedCipherProvider cipherProvider
private final EncryptionMethod encryptionMethod
private final SecretKey secretKey
private final SecureRandom secureRandom
private final String description
protected KeyedCipherPropertyEncryptor(KeyedCipherProvider cipherProvider, EncryptionMethod encryptionMethod, SecretKey secretKey)
protected Cipher getDecryptionCipher(byte[] encryptedBinary)
getDecryptionCipher in class CipherPropertyEncryptorencryptedBinary - Encrypted Binaryprotected Cipher getEncryptionCipher(byte[] encodedParameters)
getEncryptionCipher in class CipherPropertyEncryptorencodedParameters - Binary encoded parameters containing random initialization vectorprotected byte[] getCipherBinary(byte[] encryptedBinary)
getCipherBinary in class CipherPropertyEncryptorencryptedBinary - Encrypted Binary containing cipher binary and other informationprotected byte[] getEncodedParameters()
getEncodedParameters in class CipherPropertyEncryptorprivate Cipher getCipher(byte[] initializationVector, boolean encrypt)
private byte[] readInitializationVector(byte[] binary)
public boolean equals(Object object)
public int hashCode()
Copyright © 2023 Apache NiFi Project. All rights reserved.