def _hexdigest(cls, *args): h = hashlib.md5() if args: for a in args: h.update(force_bytes(a)) hexdigest = h.hexdigest()[:8] return hexdigest