Package org.apache.nifi.encrypt
Class StandardPropertySecretKeyProvider
java.lang.Object
org.apache.nifi.encrypt.StandardPropertySecretKeyProvider
- All Implemented Interfaces:
PropertySecretKeyProvider
Standard implementation of Property Secret Key Provider implementing supported Key Derivation Functions
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]Standard Application Salt supporting deterministic encrypted property comparisonprivate static final Argon2DerivedKeyParameterSpecArgon2 Parameter Specification configured with settings introduced in 1.12.0private static final Argon2DerivedKeyProviderprivate static final org.slf4j.Loggerprivate static final intprivate static final Stringprivate static final Pbkdf2DerivedKeyParameterSpecPBKDF2 Parameter Specification configured with settings introduced in 0.5.0private static final Pbkdf2DerivedKeyProviderprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate DerivedKeygetDerivedKey(PropertyEncryptionMethod propertyEncryptionMethod, String password) getSecretKey(PropertyEncryptionMethod propertyEncryptionMethod, String password) Get Secret Key using Property Encryption Method with provided password
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
APPLICATION_SALT
private static final byte[] APPLICATION_SALTStandard Application Salt supporting deterministic encrypted property comparison -
ARGON2_PARAMETER_SPEC
Argon2 Parameter Specification configured with settings introduced in 1.12.0 -
PBKDF2_PARAMETER_SPEC
PBKDF2 Parameter Specification configured with settings introduced in 0.5.0 -
MINIMUM_PASSWORD_LENGTH
private static final int MINIMUM_PASSWORD_LENGTH- See Also:
-
PASSWORD_LENGTH_MESSAGE
-
SECRET_KEY_ALGORITHM
- See Also:
-
argon2DerivedKeyProvider
-
pbkdf2DerivedKeyProvider
-
-
Constructor Details
-
StandardPropertySecretKeyProvider
StandardPropertySecretKeyProvider()
-
-
Method Details
-
getSecretKey
Get Secret Key using Property Encryption Method with provided password- Specified by:
getSecretKeyin interfacePropertySecretKeyProvider- Parameters:
propertyEncryptionMethod- Property Encryption Methodpassword- Password used to derive Secret Key- Returns:
- Derived Secret Key
-
getDerivedKey
private DerivedKey getDerivedKey(PropertyEncryptionMethod propertyEncryptionMethod, String password)
-