server side encryption WIP

This commit is contained in:
azivner
2017-11-10 22:55:19 -05:00
parent 8f1eedfe0d
commit ec49bf0cca
11 changed files with 101 additions and 38 deletions

View File

@@ -16,7 +16,7 @@ function decryptDataKey(passwordDerivedKey, encryptedBase64) {
const encryptedBytes = utils.fromBase64(encryptedBase64);
const aes = getAes(passwordDerivedKey);
return aes.decrypt(encryptedBytes).slice(4);
return Array.from(aes.decrypt(encryptedBytes).slice(4));
}
function encryptDataKey(passwordDerivedKey, plainText) {