RED-6686 path fix
This commit is contained in:
parent
d173cd8825
commit
f8cf54be7a
@ -53,7 +53,11 @@ public class EncryptionDecryptionService {
|
||||
@SneakyThrows
|
||||
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
|
||||
public String decrypt(String strToDecrypt) {
|
||||
|
||||
if (strToDecrypt == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
byte[] bytes = Base64.getDecoder().decode(strToDecrypt);
|
||||
return new String(decrypt(bytes), StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user