use decryptString()

This commit is contained in:
zadam
2019-11-02 07:50:23 +01:00
parent 475fddeec1
commit b7b583ff04
5 changed files with 11 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ function isProtectedSessionAvailable() {
function decryptNotes(notes) {
for (const note of notes) {
if (note.isProtected) {
note.title = decrypt(note.title).toString();
note.title = decrypt(note.title);
}
}
}
@@ -50,12 +50,17 @@ function decrypt(cipherText) {
return dataEncryptionService.decrypt(getDataKey(), cipherText);
}
function decryptString(cipherText) {
return dataEncryptionService.decryptString(getDataKey(), cipherText);
}
module.exports = {
setDataKey,
getDataKey,
isProtectedSessionAvailable,
encrypt,
decrypt,
decryptString,
decryptNotes,
setProtectedSessionId
};