Returns the SHA256 checksum of the given data. :param data: The data to checksum. :return: The SHA256 checksum of the given data.
(data)
| 70 | |
| 71 | |
| 72 | def checksum(data) -> str: |
| 73 | """ |
| 74 | Returns the SHA256 checksum of the given data. |
| 75 | |
| 76 | :param data: The data to checksum. |
| 77 | :return: The SHA256 checksum of the given data. |
| 78 | """ |
| 79 | data_str = json.dumps(data, sort_keys=True) |
| 80 | hash_object = hashlib.sha256() |
| 81 | hash_object.update(data_str.encode()) |
| 82 | return hash_object.hexdigest() |
| 83 | |
| 84 | |
| 85 | def i18n_text( |
no test coverage detected