Class SymmetricDecryptingReader
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.DecryptingReader
com.northconcepts.datapipeline.security.SymmetricDecryptingReader
A
DecryptingReader that decrypts fields written by a SymmetricEncryptingReader, restoring each field's
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.DecryptingReader
cipher, deserializer, fieldsFields 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
ConstructorsConstructorDescriptionSymmetricDecryptingReader(DataReader nestedDataReader) SymmetricDecryptingReader(DataReader nestedDataReader, String symmetricAlgorithm, SecretKey symmetricKey) -
Method Summary
Modifier and TypeMethodDescriptionaddExceptionProperties(DataException exception) Adds this endpoint's current state to aDataException.Adds fields to decrypt; only allowed before the reader is opened.addFields(Collection<String> fieldNames) Adds fields to decrypt; only allowed before the reader is opened.protected voiddecryptFieldImpl(Field field) Replaces the field's encrypted value in place with the original type and value.Returns theCipheralgorithm used to decrypt, such asAES; required to open the reader.Returns the secret key used to decrypt; required to open the reader.protected voidInitializes or resetsDecryptingReader.cipherfor decryption; called when the reader opens and again after a field fails to decrypt.setSymmetricAlgorithm(String symmetricAlgorithm) Sets theCipheralgorithm used to decrypt, such asAES; required to open the reader.setSymmetricKey(SecretKey symmetricKey) Sets the secret key used to decrypt; required to open the reader.Methods inherited from class com.northconcepts.datapipeline.security.DecryptingReader
decryptField, 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
-
SymmetricDecryptingReader
-
SymmetricDecryptingReader
public SymmetricDecryptingReader(DataReader nestedDataReader, String symmetricAlgorithm, SecretKey symmetricKey)
-
-
Method Details
-
getSymmetricAlgorithm
Returns theCipheralgorithm used to decrypt, such asAES; required to open the reader. -
setSymmetricAlgorithm
Sets theCipheralgorithm used to decrypt, such asAES; required to open the reader. -
getSymmetricKey
Returns the secret key used to decrypt; required to open the reader. -
setSymmetricKey
Sets the secret key used to decrypt; required to open the reader. -
addFields
Description copied from class:DecryptingReaderAdds fields to decrypt; only allowed before the reader is opened.- Overrides:
addFieldsin classDecryptingReader
-
addFields
Description copied from class:DecryptingReaderAdds fields to decrypt; only allowed before the reader is opened.- Overrides:
addFieldsin classDecryptingReader
-
initCipher
protected void initCipher()Description copied from class:DecryptingReaderInitializes or resetsDecryptingReader.cipherfor decryption; called when the reader opens and again after a field fails to decrypt.- Specified by:
initCipherin classDecryptingReader
-
decryptFieldImpl
Description copied from class:DecryptingReaderReplaces the field's encrypted value in place with the original type and value.- Specified by:
decryptFieldImplin classDecryptingReader- 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 classDecryptingReader
-