PyDocs

Nav

Cryptographic Services

hash.digest_size

The size of the resulting hash in bytes.
1 Example
>>> from hashlib import blake2b
>>> h = blake2b(digest_size=20)
>>> h.update(b'Replacing SHA1 with the more secure function')
>>> h.hexdigest()
'd24f26cf8de66472d58d4e1b1774b4c9158b1f4c'
>>> h.digest_size
20
>>> len(h.digest())
20
from the Python docs
See Also
No see-alsos for hashlib/hash.digest_size
0 Notes
No notes for hash.digest_size