Пример #1
0
    def __hash_object_v1__(cls, obj: dict) -> str:
        """
        Calculates SHA-256 hash of JSON encoded 'obj'.

        :param obj: Object to be hashed.
        :return: SHA-256 as hexadecimal string.
        :rtype: str
        """
        return hash_object(cls.__json_encoder_v1__, obj)
Пример #2
0
 def __hash_object__(cls, obj):
     return hash_object(cls.__json_encoder_class__, obj)