Files
ray-project--ray/python/ray/_private/authentication/authentication_token_generator.py
T
2026-07-13 13:17:40 +08:00

10 lines
251 B
Python

import secrets
def generate_new_authentication_token() -> str:
"""Generate an authentication token for the cluster.
256 bits of entropy is considered sufficient to be durable to brute force attacks.
"""
return secrets.token_hex(32)