コード例 #1
0
ファイル: test_digest.py プロジェクト: JHUAPL/PyKMIP
    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
ファイル: test_digest.py プロジェクト: JHUAPL/PyKMIP
    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)