refactored all mentions of "history" to "revision"

This commit is contained in:
azivner
2018-03-25 20:52:38 -04:00
parent a69d8737ce
commit 47eb1e3e02
22 changed files with 147 additions and 149 deletions

View File

@@ -75,7 +75,7 @@ function decryptNotes(dataKey, notes) {
}
}
function decryptNoteHistoryRow(dataKey, hist) {
function decryptNoteRevision(dataKey, hist) {
dataKey = getDataKey(dataKey);
if (!hist.isProtected) {
@@ -91,11 +91,11 @@ function decryptNoteHistoryRow(dataKey, hist) {
}
}
function decryptNoteHistoryRows(dataKey, historyRows) {
function decryptNoteRevisions(dataKey, noteRevisions) {
dataKey = getDataKey(dataKey);
for (const hist of historyRows) {
decryptNoteHistoryRow(dataKey, hist);
for (const revision of noteRevisions) {
decryptNoteRevision(dataKey, revision);
}
}
@@ -106,11 +106,11 @@ function encryptNote(dataKey, note) {
note.content = data_encryption.encrypt(dataKey, data_encryption.noteContentIv(note.noteId), note.content);
}
function encryptNoteHistoryRow(dataKey, history) {
function encryptNoteRevision(dataKey, revision) {
dataKey = getDataKey(dataKey);
history.title = data_encryption.encrypt(dataKey, data_encryption.noteTitleIv(history.noteRevisionId), history.title);
history.content = data_encryption.encrypt(dataKey, data_encryption.noteContentIv(history.noteRevisionId), history.content);
revision.title = data_encryption.encrypt(dataKey, data_encryption.noteTitleIv(revision.noteRevisionId), revision.title);
revision.content = data_encryption.encrypt(dataKey, data_encryption.noteContentIv(revision.noteRevisionId), revision.content);
}
module.exports = {
@@ -120,8 +120,8 @@ module.exports = {
isProtectedSessionAvailable,
decryptNote,
decryptNotes,
decryptNoteHistoryRow,
decryptNoteHistoryRows,
decryptNoteRevision,
decryptNoteRevisions,
encryptNote,
encryptNoteHistoryRow
encryptNoteRevision
};