Shortest hash in python to name cache files

后端 未结 8 652
春和景丽
春和景丽 2020-12-23 22:45

What is the shortest hash (in filename-usable form, like a hexdigest) available in python? My application wants to save cache files for some objects. The objects mu

8条回答
  •  感动是毒
    2020-12-23 23:21

    We use hashlib.sha1.hexdigest(), which produces even longer strings, for cache objects with good success. Nobody is actually looking at cache files anyway.

提交回复
热议问题