RED-6686 path fix
This commit is contained in:
parent
d173cd8825
commit
f8cf54be7a
@ -53,7 +53,11 @@ public class EncryptionDecryptionService {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public String encrypt(String strToEncrypt) {
|
public String encrypt(String strToEncrypt) {
|
||||||
|
|
||||||
return Base64.getEncoder().encodeToString(encrypt(strToEncrypt.getBytes()));
|
if (strToEncrypt != null) {
|
||||||
|
return Base64.getEncoder().encodeToString(encrypt(strToEncrypt.getBytes()));
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -75,6 +79,10 @@ public class EncryptionDecryptionService {
|
|||||||
@SneakyThrows
|
@SneakyThrows
|
||||||
public String decrypt(String strToDecrypt) {
|
public String decrypt(String strToDecrypt) {
|
||||||
|
|
||||||
|
if (strToDecrypt == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
byte[] bytes = Base64.getDecoder().decode(strToDecrypt);
|
byte[] bytes = Base64.getDecoder().decode(strToDecrypt);
|
||||||
return new String(decrypt(bytes), StandardCharsets.UTF_8);
|
return new String(decrypt(bytes), StandardCharsets.UTF_8);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user