mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 13:32:24 +00:00
chore: use Base64 library for generating SS password
This commit is contained in:
parent
101e9ebf35
commit
a45e9de472
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ class RandomUtil {
|
||||||
static randomShadowsocksPassword() {
|
static randomShadowsocksPassword() {
|
||||||
let array = new Uint8Array(32);
|
let array = new Uint8Array(32);
|
||||||
window.crypto.getRandomValues(array);
|
window.crypto.getRandomValues(array);
|
||||||
return btoa(String.fromCharCode.apply(null, array));
|
return Base64.encode(String.fromCharCode.apply(null, array));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue