Class AsymmetricDecryptingReader
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.AsymmetricDecryptingReader
A
DecryptingReader for fields written by an AsymmetricEncryptingReader; it recovers the symmetric key
from the first value it decrypts, using the private key, and uses it for all values.-
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
ConstructorsConstructorDescriptionAsymmetricDecryptingReader(DataReader nestedDataReader) AsymmetricDecryptingReader(DataReader nestedDataReader, String asymmetricAlgorithm, PrivateKey asymmetricKey) -
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 the algorithm used with the private key to decrypt the symmetric key, such asRSA; required to open the reader.Returns the private key used to decrypt the symmetric key; required to open the reader.Returns the algorithm of the symmetric key that encrypted the fields (default isAES).protected voidInitializes or resetsDecryptingReader.cipherfor decryption; called when the reader opens and again after a field fails to decrypt.setAsymmetricAlgorithm(String asymmetricAlgorithm) Sets the algorithm used with the private key to decrypt the symmetric key, such asRSA; required to open the reader.setAsymmetricKey(PrivateKey asymmetricKey) Sets the private key used to decrypt the symmetric key; required to open the reader.setSymmetricAlgorithm(String symmetricAlgorithm) Sets the algorithm of the symmetric key that encrypted the fields (default isAES).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
-
AsymmetricDecryptingReader
-
AsymmetricDecryptingReader
public AsymmetricDecryptingReader(DataReader nestedDataReader, String asymmetricAlgorithm, PrivateKey asymmetricKey)
-
-
Method Details
-
getAsymmetricAlgorithm
Returns the algorithm used with the private key to decrypt the symmetric key, such asRSA; required to open the reader. -
setAsymmetricAlgorithm
Sets the algorithm used with the private key to decrypt the symmetric key, such asRSA; required to open the reader. -
getAsymmetricKey
Returns the private key used to decrypt the symmetric key; required to open the reader. -
setAsymmetricKey
Sets the private key used to decrypt the symmetric key; required to open the reader. -
getSymmetricAlgorithm
Returns the algorithm of the symmetric key that encrypted the fields (default isAES). -
setSymmetricAlgorithm
Sets the algorithm of the symmetric key that encrypted the fields (default isAES). -
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
-