Set master

This commit is contained in:
Jiiks 2018-08-10 17:04:09 +03:00
parent bdec8b842e
commit b67ca5c42d
1 changed files with 3 additions and 1 deletions

View File

@ -26,7 +26,9 @@ export default new class E2EE extends BuiltinModule {
setMaster(key) {
seed = Math.random().toString(36).replace(/[^a-z]+/g, '');
this.master = this.encrypt(seed, key);
const newMaster = this.encrypt(seed, key);
// TODO re-encrypt everything with new master
return (this.master = newMaster);
}
get settingPath() {