Package passwordmanager.encoder
Class ThreadEncoder
java.lang.Object
passwordmanager.encoder.ThreadEncoder
- All Implemented Interfaces:
IEncoder
Encoder implementation that allows you to encrypt and decrypt both text data
and data structures, with multi-threading support
- Since:
- 2023-12-14
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface passwordmanager.encoder.IEncoder
IEncoder.EncoderAlgorithm -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate IEncoder.EncoderAlgorithmLink to encoding algorithm (IEncoder.EncoderAlgorithm)private intField storing the number of threads available for useprivate org.jasypt.encryption.pbe.PooledPBEStringEncryptorLink to encryptor -
Constructor Summary
ConstructorsConstructorDescriptionA constructor that creates a record of the object's creation event and sets the default encryption/decryption algorithm -
Method Summary
Modifier and TypeMethodDescriptiondecodeString(String encodedData, String key) Method for decrypting text datadecodeStruct(IRawData rawData, String key) Method for decrypting data structureencodeString(String decodedData, String key) Method for encrypting text dataencodeStruct(IStorage data, String key) Method for encrypting data structurevoidMethod for changing the encryption/decryption algorithm
-
Field Details
-
encoderAlgorithm
Link to encoding algorithm (IEncoder.EncoderAlgorithm) -
textEncryptor
private org.jasypt.encryption.pbe.PooledPBEStringEncryptor textEncryptorLink to encryptor -
numberOfThreads
private int numberOfThreadsField storing the number of threads available for use
-
-
Constructor Details
-
ThreadEncoder
public ThreadEncoder()A constructor that creates a record of the object's creation event and sets the default encryption/decryption algorithm
-
-
Method Details
-
decodeString
Method for decrypting text data- Specified by:
decodeStringin interfaceIEncoder- Parameters:
encodedData- encrypted textkey- decryption key- Returns:
- decrypted text
-
decodeStruct
Method for decrypting data structure- Specified by:
decodeStructin interfaceIEncoder- Parameters:
rawData- encrypted data structurekey- decryption key- Returns:
- decrypted structure
-
encodeString
Method for encrypting text data- Specified by:
encodeStringin interfaceIEncoder- Parameters:
decodedData- decrypted textkey- encription key- Returns:
- encrypted text
-
encodeStruct
Method for encrypting data structure- Specified by:
encodeStructin interfaceIEncoder- Parameters:
data- decrypted data structurekey- encryption key- Returns:
- encrypted structure
-
setAlgorithm
Method for changing the encryption/decryption algorithm- Specified by:
setAlgorithmin interfaceIEncoder- Parameters:
algo- new encryption/decryption algorithm
-