Compute a hash digest of some data. We use a cryptographic hash because we want a low probability of accidental collision, but we don't really care about any of the cryptographic properties.
(data: bytes)
| 570 | |
| 571 | |
| 572 | def hash_digest(data: bytes) -> str: |
| 573 | """Compute a hash digest of some data. |
| 574 | |
| 575 | We use a cryptographic hash because we want a low probability of |
| 576 | accidental collision, but we don't really care about any of the |
| 577 | cryptographic properties. |
| 578 | """ |
| 579 | return hashlib.sha1(data).hexdigest() |
| 580 | |
| 581 | |
| 582 | def hash_digest_bytes(data: bytes) -> bytes: |
no outgoing calls
no test coverage detected
searching dependent graphs…