Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    This uses the exactly same algorithm as given in the answer by maxschlepzig, so presumably the performance will be the same. Commented Feb 6, 2023 at 22:17
  • FTR, direct link to Python's file_digest implementation. Commented Mar 5, 2023 at 13:27
  • digest = hashlib.file_digest(f, "sha256") AttributeError: module 'hashlib' has no attribute 'file_digest' Commented Apr 4, 2023 at 13:54
  • Check that your Python version is not lower than said in the answer. Commented Apr 5, 2023 at 4:54