make encryption more robust in face of null values, #1483

This commit is contained in:
zadam 2020-12-21 22:08:55 +01:00
parent fc4edf4aa7
commit 7133e60267

View File

@ -43,10 +43,18 @@ function decryptNotes(notes) {
}
function encrypt(plainText) {
if (plainText === null) {
return null;
}
return dataEncryptionService.encrypt(getDataKey(), plainText);
}
function decrypt(cipherText) {
if (cipherText === null) {
return null;
}
return dataEncryptionService.decrypt(getDataKey(), cipherText);
}