pygsti.baseobjs.smartcache.digest

Contents

pygsti.baseobjs.smartcache.digest#

digest(obj, custom_digests=None)#

Returns an MD5 digest of an arbitrary Python object, obj.

Parameters:
  • obj (object) – Object to digest.

  • custom_digests (list, optional) – A list of custom digest functions. Each function should have the signature digest(md5 : hashlib.md5, value) and either digest value (calling md5.update or similar) or raise a CustomDigestError to indicate it was unable to digest value.

Return type:

MD5_digest