ewokscore.hashing.UniversalHashable#
- class ewokscore.hashing.UniversalHashable(pre_uhash=None, instance_nonce=None)[source]#
Bases:
HasUhashThe universal hash of an instance of this class is based on:
pre-uhash
instance nonce (if any)
The universal hash is equal to the pre-hash when an instance nonce is not provided.
The pre-uhash is either provided or based on:
data
class nonce (class qualifier name, class version, superclass nonce)
- Parameters:
pre_uhash (
Union[str,bytes,UniversalHash,HasUhash,None])instance_nonce (
Optional[Any])
- MISSING_DATA = <MISSING_DATA>#
- cleanup_references()[source]#
Remove all references to other hashables. Side effect: fixes the uhash when it depends on another hashable.
- set_uhash_init(pre_uhash=None, instance_nonce=None)[source]#
- Parameters:
pre_uhash (
Union[str,bytes,UniversalHash,HasUhash,None])instance_nonce (
Optional[Any])
- property uhash: UniversalHash | None#