kmip/pie/client.py
def _build_mac_signature_key_information(self, value):
        """
        Build an MACSignatureKeyInformation struct from a dictionary.

        Args:
            value (dict): A dictionary containing the key/value pairs for a
                MACSignatureKeyInformation struct.

        Returns:
            MACSignatureInformation: a MACSignatureKeyInformation struct

        Raises:
            TypeError: if the input argument is invalid
        """
        if value is None:
            return None
        if not isinstance(value, dict):
            raise TypeError(
                "MAC/signature key information must be a dictionary."
            )

        cryptographic_parameters = value.get('cryptographic_parameters')
        if cryptographic_parameters:
            cryptographic_parameters = self._build_cryptographic_parameters(
                cryptographic_parameters
            )
        mac_signature_key_information = cobjects.MACSignatureKeyInformation(
            unique_identifier=value.get('unique_identifier'),
            cryptographic_parameters=cryptographic_parameters
        )
        return mac_signature_key_information
def _build_mac_signature_key_information(self, value):
        """
        Build an MACSignatureKeyInformation struct from a dictionary.

        Args:
            value (dict): A dictionary containing the key/value pairs for a
                MACSignatureKeyInformation struct.

        Returns:
            MACSignatureInformation: a MACSignatureKeyInformation struct

        Raises:
            TypeError: if the input argument is invalid
        """
        if value is None:
            return None
        if not isinstance(value, dict):
            raise TypeError(
                "MAC/signature key information must be a dictionary."
            )

        cryptographic_parameters = value.get('cryptographic_parameters')
        if cryptographic_parameters:
            cryptographic_parameters = self._build_cryptographic_parameters(
                cryptographic_parameters
            )
        mac_signature_key_information = cobjects.MACSignatureKeyInformation(
            unique_identifier=value.get('unique_identifier'),
            cryptographic_parameters=cryptographic_parameters
        )
        return mac_signature_key_information
Build an MACSignatureKeyInformation struct from a dictionary.

        Args:
            value (dict): A dictionary containing the key/value pairs for a
                MACSignatureKeyInformation struct.

        Returns:
            MACSignatureInformation: a MACSignatureKeyInformation struct

        Raises:
            TypeError: if the input argument is invalid