File size: 427 Bytes
86d2f2e 21dae66 86d2f2e 21dae66 86d2f2e 21dae66 86d2f2e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import random
import string
import hashlib
def generate_random_md5():
# Generate a random string
random_string = "".join(random.choices(string.ascii_letters + string.digits, k=16))
# Encode the string and compute its MD5 hash
md5_hash = hashlib.md5(random_string.encode()).hexdigest()
return md5_hash
def add_data_to_individual(key, value, individual):
individual[key] = value
return individual
|