INNER CODE UNIT · Python
entropy_per_char
CYBERGEM777/HIDEAGEM · extras/ComfyUI/HIDEAGEM_NODES.py:287
entropy_per_char = math.log2(len(base62_charset))
# Calculate the minimum password length needed to achieve the target entropy
min_length = math.ceil(bits_of_entropy / entropy_per_char)
# Generate the random password
return ''.join(secrets.choice(base62_charset) for _ in range(min_length))
class HideAGem_AutoHide_RandomPassword:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"gem_image": ("IMAGE",),