class PasswordBasedCipherPropertyEncryptor extends CipherPropertyEncryptor
| Modifier and Type | Field and Description |
|---|---|
private static int |
ARRAY_START |
private PBECipherProvider |
cipherProvider |
private static boolean |
DECRYPT |
private String |
description |
private static boolean |
ENCRYPT |
private EncryptionMethod |
encryptionMethod |
private int |
keyLength |
private String |
password |
private int |
saltLength |
| Modifier | Constructor and Description |
|---|---|
protected |
PasswordBasedCipherPropertyEncryptor(PBECipherProvider cipherProvider,
EncryptionMethod encryptionMethod,
String password) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object object)
Return object equality based on Encryption Method and Password
|
private Cipher |
getCipher(byte[] salt,
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 salt generated from the Cipher Provider
|
protected Cipher |
getEncryptionCipher(byte[] encodedParameters)
Get Cipher for Encryption using encoded parameters containing random salt generated for encoding parameters
|
int |
hashCode()
Return hash code based on Encryption Method and Password
|
private byte[] |
readSalt(byte[] binary) |
String |
toString()
Return String containing object description
|
decrypt, encryptprivate static final int ARRAY_START
private static final boolean ENCRYPT
private static final boolean DECRYPT
private final PBECipherProvider cipherProvider
private final EncryptionMethod encryptionMethod
private final String password
private final int keyLength
private final int saltLength
private final String description
protected PasswordBasedCipherPropertyEncryptor(PBECipherProvider cipherProvider, EncryptionMethod encryptionMethod, String password)
protected Cipher getDecryptionCipher(byte[] encryptedBinary)
getDecryptionCipher in class CipherPropertyEncryptorencryptedBinary - Encrypted Binaryprotected Cipher getEncryptionCipher(byte[] encodedParameters)
getEncryptionCipher in class CipherPropertyEncryptorencodedParameters - Binary encoded parameters containing random salt generated from Cipher Providerprotected 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[] salt, boolean encrypt)
private byte[] readSalt(byte[] binary)
public boolean equals(Object object)
public int hashCode()
Copyright © 2023 Apache NiFi Project. All rights reserved.