feat: require password for encrypted backups

This commit is contained in:
thecodrr
2022-01-10 13:10:21 +05:00
parent a130db41a4
commit cce90b8f56
2 changed files with 30 additions and 9 deletions

View File

@@ -49,6 +49,10 @@ export default class Storage {
return this.storage.getCryptoKey(name);
}
generateCryptoKey(password, salt) {
return this.storage.generateCryptoKey(password, salt);
}
async generateRandomKey() {
const passwordBytes = randomBytes(124);
const password = passwordBytes.toString("base64");