Package overit.geocall.crypto
Class EncryptionServiceImpl
java.lang.Object
overit.geocall.crypto.EncryptionServiceImpl
- All Implemented Interfaces:
EncryptionService
EncryptionService implementation useful to encrypt/decrypt data.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringstatic final LogChannel -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newEncryptionServiceImplinstance using the provided parameter.EncryptionServiceImpl(@NotNull String encryptKey, @NotNull String decryptKey) Creates a newEncryptionServiceImplinstance using the provided parameter. -
Method Summary
-
Field Details
-
LOG
-
KEY_CANNOT_BE_NULL
- See Also:
-
CRYPT_UTIL_CANNOT_BE_NULL
- See Also:
-
-
Constructor Details
-
EncryptionServiceImpl
Creates a newEncryptionServiceImplinstance using the provided parameter.- Parameters:
key-Stringabout the key need to encrypt/decrypt data.
-
EncryptionServiceImpl
public EncryptionServiceImpl(@NotNull @NotNull String encryptKey, @NotNull @NotNull String decryptKey) Creates a newEncryptionServiceImplinstance using the provided parameter.
-
-
Method Details
-
encrypt
Description copied from interface:EncryptionServiceReturns the provided value once it has been encrypted.- Specified by:
encryptin interfaceEncryptionService- Parameters:
valueToBeEncrypted-Stringto be encrypted.- Returns:
- the provided value once it has been encrypted.
- Throws:
CryptoException- exception thrown in case of error occurred during the data encryption.
-
decrypt
Description copied from interface:EncryptionServiceReturns the provided value once it has been decrypted.- Specified by:
decryptin interfaceEncryptionService- Parameters:
valueToBeDecrypted-Stringto be decrypted.- Returns:
- the provided value once it has been decrypted.
- Throws:
CryptoException- exception thrown in case of error occurred during the data decryption.
-