mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
33 lines
723 B
JavaScript
33 lines
723 B
JavaScript
export default class Storage {
|
|
constructor(context) {
|
|
this.storage = context;
|
|
}
|
|
write(key, data) {
|
|
return this.storage.write(key, data);
|
|
}
|
|
readMulti(keys) {
|
|
return this.storage.readMulti(keys);
|
|
}
|
|
read(key, isArray = false) {
|
|
return this.storage.read(key, isArray);
|
|
}
|
|
clear() {
|
|
return this.storage.clear();
|
|
}
|
|
remove(key) {
|
|
return this.storage.remove(key);
|
|
}
|
|
getAllKeys() {
|
|
return this.storage.getAllKeys();
|
|
}
|
|
encrypt(password, data) {
|
|
return this.storage.encrypt(password, data);
|
|
}
|
|
decrypt(password, cipher) {
|
|
return this.storage.decrypt(password, cipher);
|
|
}
|
|
deriveKey(password, salt) {
|
|
return this.storage.deriveKey(password, salt, true);
|
|
}
|
|
}
|