mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
Revert "feat: use libsodium for all cryptography"
This reverts commit 668fe6fd33.
This commit is contained in:
@@ -38,8 +38,7 @@ class Crypto {
|
||||
return { key, salt: saltHex };
|
||||
}
|
||||
|
||||
encrypt(password, data) {
|
||||
if (typeof data === "object") data = JSON.stringify(data);
|
||||
encrypt({ password, data }) {
|
||||
this._throwIfNotReady();
|
||||
const { key, salt } = this._deriveKey(
|
||||
password,
|
||||
@@ -66,7 +65,7 @@ class Crypto {
|
||||
};
|
||||
}
|
||||
|
||||
decrypt(password, { salt, iv, cipher }) {
|
||||
decrypt({ password, data: { salt, iv, cipher } }) {
|
||||
this._throwIfNotReady();
|
||||
const { key } = this._deriveKey(
|
||||
password,
|
||||
|
||||
Reference in New Issue
Block a user