parent
4f7b1fc4d2
commit
3dc1fa3567
3 changed files with 68 additions and 6 deletions
|
|
@ -76,6 +76,7 @@ class Util {
|
|||
|
||||
if (url == null) {
|
||||
reject("No url found!");
|
||||
return;
|
||||
}
|
||||
axios.get(url, { responseType: 'arraybuffer' })
|
||||
.then(response => {
|
||||
|
|
@ -288,6 +289,16 @@ class Util {
|
|||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate random 12 char password
|
||||
*/
|
||||
randomPass() {
|
||||
return this.randomString(
|
||||
12,
|
||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#_-*+"
|
||||
);
|
||||
}
|
||||
|
||||
// From here: https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript
|
||||
randomString(length, characters) {
|
||||
var result = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue