mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 14:39:34 +01:00
25 lines
506 B
JavaScript
25 lines
506 B
JavaScript
export default class Storage {
|
|
constructor(context) {
|
|
this.storage = context;
|
|
}
|
|
async write(key, data) {
|
|
await this.storage.write(key, data);
|
|
}
|
|
async read(key) {
|
|
let data = await this.storage.read(key);
|
|
return data;
|
|
}
|
|
clear() {
|
|
this.storage.clear();
|
|
}
|
|
remove(key) {
|
|
this.storage.remove(key);
|
|
}
|
|
encrypt(password, data) {
|
|
return this.storage.encrypt(password, data);
|
|
}
|
|
decrypt(password, cipher) {
|
|
return this.storage.decrypt(password, cipher);
|
|
}
|
|
}
|