Class LocalKeystoreDataEncryptor
- java.lang.Object
-
- com.avoka.fc.core.service.storage.LocalKeystoreDataEncryptor
-
- All Implemented Interfaces:
ISubmissionDataEncryptor
public class LocalKeystoreDataEncryptor extends Object implements ISubmissionDataEncryptor
Provides a Local database Keystore data encryption class.- Since:
- 4.3.4
-
-
Constructor Summary
Constructors Constructor Description LocalKeystoreDataEncryptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
decodeData(Submission submission, byte[] data, String encoding)
Decode the data for the given submission with the encoding type.String
decryptText(Submission submission, String cypherText)
Decrypt a submission related string that was created using encryptTextbyte[]
encodeData(Submission submission, byte[] data, String encoding)
Encode the data for the given submission with the encoding type.String
encryptText(Submission submission, String plainText)
Encrypt a string related to a submissionboolean
initializeCryptoDataKey(Submission submission)
returns false as there is no crypto key to initialize This is called on Render to avoid a race condition TMR-2171 with multi simultaneous Dynamic Data Calls.void
setStorageServiceDefinition(ServiceDefinition serviceDef)
Set the parent submission data storage service definition.
-
-
-
Method Detail
-
encodeData
public byte[] encodeData(Submission submission, byte[] data, String encoding)
Encode the data for the given submission with the encoding type.- Specified by:
encodeData
in interfaceISubmissionDataEncryptor
- Parameters:
submission
- the submission record (required)data
- the data to encode (required)encoding
- the encoding mode- Returns:
- the encode data
- See Also:
ISubmissionDataEncryptor.encodeData(Submission, byte[], String)
-
decodeData
public byte[] decodeData(Submission submission, byte[] data, String encoding)
Decode the data for the given submission with the encoding type.- Specified by:
decodeData
in interfaceISubmissionDataEncryptor
- Parameters:
submission
- the submission record (required)data
- the data to encode (required)encoding
- the encoding mode- Returns:
- the encode data
- See Also:
ISubmissionDataEncryptor.decodeData(Submission, byte[], String)
-
encryptText
public String encryptText(Submission submission, String plainText)
Encrypt a string related to a submission- Specified by:
encryptText
in interfaceISubmissionDataEncryptor
- Parameters:
submission
- the submission which the string relates to (required)plainText
- the plain text string to be encrypted- Returns:
- the encrypted string - note that this will generally be longer than the original
- See Also:
ISubmissionDataEncryptor.encryptText(Submission, String)
-
decryptText
public String decryptText(Submission submission, String cypherText)
Decrypt a submission related string that was created using encryptText- Specified by:
decryptText
in interfaceISubmissionDataEncryptor
- Parameters:
submission
- the submission which the string relates to (required)cypherText
- the encrypted string- Returns:
- the plain text string
- See Also:
ISubmissionDataEncryptor.decryptText(Submission, String)
-
setStorageServiceDefinition
public void setStorageServiceDefinition(ServiceDefinition serviceDef)
Set the parent submission data storage service definition.- Specified by:
setStorageServiceDefinition
in interfaceISubmissionDataEncryptor
- Parameters:
serviceDef
- set the parent submission data storage service definition.- See Also:
ISubmissionDataEncryptor.setStorageServiceDefinition(ServiceDefinition)
-
initializeCryptoDataKey
public boolean initializeCryptoDataKey(Submission submission)
returns false as there is no crypto key to initialize This is called on Render to avoid a race condition TMR-2171 with multi simultaneous Dynamic Data Calls.- Specified by:
initializeCryptoDataKey
in interfaceISubmissionDataEncryptor
- Parameters:
submission
- the submission to which the data key will be created- Returns:
- false as the local data encrytor does not store a crypto key
- Since:
- 18.5.9
-
-