confingy.utils.hashing#
hashing
#
hash_class
#
hash_class(cls: type, algorithm: str = 'sha256') -> str
Create a hash of a class based on its bytecode. Only changes that affect code execution will change the hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cls
|
type
|
The class to hash |
required |
algorithm
|
str
|
The hashing algorithm to use (default: 'sha256') |
'sha256'
|
Returns:
| Type | Description |
|---|---|
str
|
Hexadecimal hash string |
Source code in src/confingy/utils/hashing.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |