chore: use Base64 library for generating SS password
This commit is contained in:
parent
101e9ebf35
commit
a45e9de472
@ -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…
x
Reference in New Issue
Block a user