mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-17 12:44:41 +03:00
chore: use Base64 library for generating SS password
This commit is contained in:
@@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user