Class SymmetricEncryptingReader
java.lang.Object
com.northconcepts.datapipeline.core.DataObject
com.northconcepts.datapipeline.core.Endpoint
com.northconcepts.datapipeline.core.DataEndpoint
com.northconcepts.datapipeline.core.DataReader
com.northconcepts.datapipeline.core.ProxyReader
com.northconcepts.datapipeline.internal.lang.IntegrationProxyReader
com.northconcepts.datapipeline.security.EncryptingReader
com.northconcepts.datapipeline.security.SymmetricEncryptingReader
An
EncryptingReader that encrypts fields with a symmetric key, storing each as Base64 text from which a
SymmetricDecryptingReader restores the original type and value.-
Nested Class Summary
Nested classes/interfaces inherited from class com.northconcepts.datapipeline.core.DataEndpoint
DataEndpoint.State -
Field Summary
Fields inherited from class com.northconcepts.datapipeline.security.EncryptingReader
buffer, cipher, fields, serializerFields inherited from class com.northconcepts.datapipeline.core.DataReader
fieldLineage, recordLineageFields inherited from class com.northconcepts.datapipeline.core.DataEndpoint
lastRecord, PRODUCT, PRODUCT_VERSION, VENDOR, XML_INPUT_FACTORY_KEYFields inherited from class com.northconcepts.datapipeline.core.Endpoint
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEFields inherited from class com.northconcepts.datapipeline.core.DataObject
id, log, name, TIMESTAMP_FORMAT -
Constructor Summary
ConstructorsConstructorDescriptionSymmetricEncryptingReader(DataReader nestedDataReader) SymmetricEncryptingReader(DataReader nestedDataReader, String symmetricAlgorithm, SecretKey symmetricKey) -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this endpoint's current state to aDataException.Adds fields to encrypt; only allowed before the reader is opened.addFields(Collection<String> fieldNames) Adds fields to encrypt; only allowed before the reader is opened.protected voidencryptFieldImpl(Field field) Replaces the field's value in place with its encrypted form.Returns theCipheralgorithm used to encrypt, such asAES; required to open the reader.Returns the secret key used to encrypt; required to open the reader.protected voidInitializes or resetsEncryptingReader.cipherfor encryption; called when the reader opens and again after a field fails to encrypt.setSymmetricAlgorithm(String symmetricAlgorithm) Sets theCipheralgorithm used to encrypt, such asAES; required to open the reader.setSymmetricKey(SecretKey symmetricKey) Sets the secret key used to encrypt; required to open the reader.Methods inherited from class com.northconcepts.datapipeline.security.EncryptingReader
encryptField, getFields, interceptRecord, openMethods inherited from class com.northconcepts.datapipeline.core.ProxyReader
available, close, getNestedReader, map, map, readImpl, setNestedDataReader, setNestedDataReaderMethods inherited from class com.northconcepts.datapipeline.core.DataReader
addLineage, getBufferSize, getNestedEndpoint, getReader, getRootEndpoint, getRootReader, isExhausted, isLineageSupported, isSaveLineage, peek, pop, push, read, setSaveLineage, skipMethods inherited from class com.northconcepts.datapipeline.core.DataEndpoint
decrementRecordCount, enableJmx, getLastRecord, getRecordCount, getRecordCountAsBigInteger, getRecordCountAsString, incrementRecordCount, isRecordCountBigInteger, resetRecordCount, toStringMethods inherited from class com.northconcepts.datapipeline.core.Endpoint
addElapsedtime, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription
-
Constructor Details
-
SymmetricEncryptingReader
-
SymmetricEncryptingReader
public SymmetricEncryptingReader(DataReader nestedDataReader, String symmetricAlgorithm, SecretKey symmetricKey)
-
-
Method Details
-
getSymmetricAlgorithm
Returns theCipheralgorithm used to encrypt, such asAES; required to open the reader. -
setSymmetricAlgorithm
Sets theCipheralgorithm used to encrypt, such asAES; required to open the reader. -
getSymmetricKey
Returns the secret key used to encrypt; required to open the reader. -
setSymmetricKey
Sets the secret key used to encrypt; required to open the reader. -
addFields
Description copied from class:EncryptingReaderAdds fields to encrypt; only allowed before the reader is opened.- Overrides:
addFieldsin classEncryptingReader
-
addFields
Description copied from class:EncryptingReaderAdds fields to encrypt; only allowed before the reader is opened.- Overrides:
addFieldsin classEncryptingReader
-
initCipher
protected void initCipher()Description copied from class:EncryptingReaderInitializes or resetsEncryptingReader.cipherfor encryption; called when the reader opens and again after a field fails to encrypt.- Specified by:
initCipherin classEncryptingReader
-
encryptFieldImpl
Description copied from class:EncryptingReaderReplaces the field's value in place with its encrypted form.- Specified by:
encryptFieldImplin classEncryptingReader- Throws:
Throwable
-
addExceptionProperties
Description copied from class:EndpointAdds this endpoint's current state to aDataException. Since this method is called whenever an exception is thrown, subclasses should override it to add their specific information.- Overrides:
addExceptionPropertiesin classEncryptingReader
-