def md5_digest(instr):
    if six.PY3:
        b = salt.utils.to_bytes(instr)
        return hashlib.md5(b).hexdigest()
    return hashlib.md5(instr).hexdigest()
Generate an md5 hash of a given string
dataset/ETHPy150Open saltstack/salt/salt/modules/hashutil.py/md5_digest