fleche.digest
Attributes
Exceptions
Exception raised when an object cannot be digested. |
Classes
str(object='') -> str |
|
Functions
|
|
|
|
|
|
|
Returns bytes representing the SHA-256 digest of value. |
Module Contents
- exception fleche.digest.Unhashable[source]
Bases:
ExceptionException raised when an object cannot be digested.
- class fleche.digest.Digest[source]
Bases:
strstr(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to ‘strict’.
- fleche.digest._digest_bytes(value: Any) bytes[source]
Returns bytes representing the SHA-256 digest of value.
All recursive call sites pass the result directly to
m.update().Wire-format note: currently returns
m.hexdigest().encode()(64 UTF-8 hex bytes) so the bytes fed into parent hashes are identical to the previousdigest(v).encode()calls — no backwards-incompatible change. To gain the raw-bytes speedup (Issue #440), change only the finalreturnhere tom.digest()(32 bytes), updatedigest()to call.hex()instead of.decode(), and change theencode()calls on the early-return paths (Digest pass-through, hooks,__digest__) tobytes.fromhex(...). That must be coordinated with ahash_versionbump and aCache.redigestmigration.