Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/MHSanaei/3x-ui.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMHSanaei <ho3ein.sanaei@gmail.com>2026-04-27 02:23:38 +0300
committerMHSanaei <ho3ein.sanaei@gmail.com>2026-04-27 02:28:06 +0300
commit9791b05a4efd2e22621927b9e80d288386e510df (patch)
tree1d9051f35c96795a2d7a41c32d619a8a33e21f7e /web/assets/js/util
parent0aca2d3b3d7e54f0408670db5f7075eaee190066 (diff)
kcp: noise, header-custom, sudoku
Diffstat (limited to 'web/assets/js/util')
-rw-r--r--web/assets/js/util/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/web/assets/js/util/index.js b/web/assets/js/util/index.js
index cc7b9287..1f481c85 100644
--- a/web/assets/js/util/index.js
+++ b/web/assets/js/util/index.js
@@ -152,6 +152,12 @@ class RandomUtil {
return Base64.alternativeEncode(String.fromCharCode(...array));
}
+ static randomBase64(length = 16) {
+ const array = new Uint8Array(length);
+ window.crypto.getRandomValues(array);
+ return Base64.alternativeEncode(String.fromCharCode(...array));
+ }
+
static randomBase32String(length = 16) {
const array = new Uint8Array(length);