From 3ee0ac8358f10f4f0e3b062f96b36055dca240fb Mon Sep 17 00:00:00 2001 From: inter Date: Mon, 8 Sep 2025 16:35:57 +0800 Subject: [PATCH] Add File --- backend/common/utils/random.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 backend/common/utils/random.py diff --git a/backend/common/utils/random.py b/backend/common/utils/random.py new file mode 100644 index 0000000..879f422 --- /dev/null +++ b/backend/common/utils/random.py @@ -0,0 +1,6 @@ +import secrets +import string + +def get_random_string(length=16): + alphabet = string.ascii_letters + string.digits + return ''.join(secrets.choice(alphabet) for _ in range(length))