Randomly generate password

This commit is contained in:
Asher 2019-03-04 11:46:34 -06:00
parent e2ec010a1d
commit 63f7c57b4e
No known key found for this signature in database
GPG key ID: 7BB4BA9C783D2BBC

View file

@ -132,7 +132,14 @@ export class Entry extends Command {
}
});
const password = "023450wf0951";
const passwordLength = 12;
const possible = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
const chars = [];
for (let i = 0; i < passwordLength; i++) {
chars.push(possible[Math.floor(Math.random() * possible.length)]);
}
const password = chars.join("");
const hasCustomHttps = certData && certKeyData;
const app = await createApp({
allowHttp: flags["allow-http"],