From 1048e522c2601f8322665627aa1116eb4ab1464f Mon Sep 17 00:00:00 2001 From: "Shishkevich D." <135337715+shishkevichd@users.noreply.github.com> Date: Fri, 20 Jun 2025 12:29:14 +0000 Subject: [PATCH] chore: refactor `randomShadowsocksPassword` function --- web/assets/js/util/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/assets/js/util/index.js b/web/assets/js/util/index.js index a9b4e7d6..c40e02c4 100644 --- a/web/assets/js/util/index.js +++ b/web/assets/js/util/index.js @@ -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; }