mirror of
https://github.com/openkmip/pykmip
synced 2025-12-27 21:53:39 +00:00
Adding support for Digest
This change adds support for the Digest attribute, including updates and unit test suites for all dependent KMIP objects.
This commit is contained in:
@@ -21,6 +21,7 @@ from kmip.core.attributes import CryptographicAlgorithm
|
||||
from kmip.core.attributes import CryptographicLength
|
||||
from kmip.core.attributes import CryptographicUsageMask
|
||||
from kmip.core.attributes import CustomAttribute
|
||||
from kmip.core.attributes import Digest
|
||||
from kmip.core.attributes import Name
|
||||
from kmip.core.attributes import ObjectGroup
|
||||
from kmip.core.attributes import UniqueIdentifier
|
||||
@@ -67,7 +68,7 @@ class AttributeValueFactory(object):
|
||||
elif name is AttributeType.DIGITAL_SIGNATURE_ALGORITHM:
|
||||
value = self._create_digital_signature_algorithm(value)
|
||||
elif name is AttributeType.DIGEST:
|
||||
value = self._create_digest(value)
|
||||
value = self._create_digest()
|
||||
elif name is AttributeType.OPERATION_POLICY_NAME:
|
||||
value = self._create_operation_policy_name(value)
|
||||
elif name is AttributeType.CRYPTOGRAPHIC_USAGE_MASK:
|
||||
@@ -182,8 +183,8 @@ class AttributeValueFactory(object):
|
||||
def _create_digital_signature_algorithm(self, alg):
|
||||
raise NotImplementedError()
|
||||
|
||||
def _create_digest(self, digest):
|
||||
raise NotImplementedError()
|
||||
def _create_digest(self):
|
||||
return Digest()
|
||||
|
||||
def _create_operation_policy_name(self, name):
|
||||
return OperationPolicyName(name)
|
||||
|
||||
Reference in New Issue
Block a user