Пример #1
0
    def test_create_with_defaults(self):
        """
        Test that a Digest object can be built using the create class method
        with no arguments.
        """
        digest = Digest.create()
        hashing_algorithm = HashingAlgorithmEnum.SHA_256
        digest_value = b''
        key_format_type = KeyFormatTypeEnum.RAW

        self._test_create(digest, hashing_algorithm, digest_value,
                          key_format_type)
Пример #2
0
    def test_create_with_defaults(self):
        """
        Test that a Digest object can be built using the create class method
        with no arguments.
        """
        digest = Digest.create()
        hashing_algorithm = HashingAlgorithmEnum.SHA_256
        digest_value = b''
        key_format_type = KeyFormatTypeEnum.RAW

        self._test_create(digest, hashing_algorithm, digest_value,
                          key_format_type)
Пример #3
0
    def test_create_with_args(self):
        """
        Test that a Digest object can be built using the create class method
        with arguments.
        """
        hashing_algorithm = HashingAlgorithmEnum.MD5
        digest_value = b'\x00\x01\x02\x03'
        key_format_type = KeyFormatTypeEnum.PKCS_1
        digest = Digest.create(hashing_algorithm, digest_value,
                               key_format_type)

        self._test_create(digest, hashing_algorithm, digest_value,
                          key_format_type)
Пример #4
0
    def test_create_with_args(self):
        """
        Test that a Digest object can be built using the create class method
        with arguments.
        """
        hashing_algorithm = HashingAlgorithmEnum.MD5
        digest_value = b'\x00\x01\x02\x03'
        key_format_type = KeyFormatTypeEnum.PKCS_1
        digest = Digest.create(hashing_algorithm, digest_value,
                               key_format_type)

        self._test_create(digest, hashing_algorithm, digest_value,
                          key_format_type)