import random
import hashlib


def md5(*args):
    """Generates MD5 based on the provided string or a random int"""
    value = ""
    if len(args) > 0:
        value = args[0]
    if value == "":
        value = str(random.getrandbits(128))
    return hashlib.md5(value.encode('utf-8')).hexdigest()