hashlib
– Hashing related functions
This module implements a subset of the corresponding CPython module,
as described below. For more information, refer to the original
CPython documentation: cpython:hashlib
.
Available on these boards
- hashlib.new(name: str, data: bytes = b'') Hash
- Returns a Hash object setup for the named algorithm. Raises ValueError when the named
algorithm is unsupported.
- Returns:
a hash object for the given algorithm
- Return type:
- class hashlib.Hash
In progress hash algorithm. This object is always created by a
hashlib.new()
. It has no user-visible constructor.- update(data: circuitpython_typing.ReadableBuffer) None
Update the hash with the given bytes.
- Parameters:
data (ReadableBuffer) – Update the hash from data in this buffer
- digest() bytes
Returns the current digest as bytes() with a length of
hashlib.Hash.digest_size
.