chore: use Base64 library for generating SS password

This commit is contained in:
Shishkevich D. 2025-03-09 06:06:27 +00:00
parent 101e9ebf35
commit a45e9de472

View file

@ -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));
} }
} }