chore: refactor randomShadowsocksPassword function

This commit is contained in:
Shishkevich D. 2025-06-20 12:29:14 +00:00
parent c503adaef7
commit 1048e522c2

View file

@ -138,10 +138,10 @@ class RandomUtil {
}
}
static randomShadowsocksPassword(method = "2022-blake3-aes-256-gcm") {
static randomShadowsocksPassword(method = SSMethods.BLAKE3_AES_256_GCM) {
let length = 32;
if (method === "2022-blake3-aes-128-gcm") {
if ([SSMethods.BLAKE3_AES_128_GCM].includes(method)) {
length = 16;
}