@is_connected
def sign(self, data, uid=None, cryptographic_parameters=None):
    '\n        Create a digital signature for data using the specified signing key.\n\n        Args:\n            data (bytes): The bytes of the data to be signed. Required.\n            uid (string): The unique ID of the signing key to use.\n                Optional, defaults to None.\n            cryptographic_parameters (dict): A dictionary containing various\n                cryptographic settings to be used for creating the signature\n                (e.g., cryptographic algorithm, hashing algorithm, and/or\n                digital signature algorithm). Optional, defaults to None.\n\n        Returns:\n            signature (bytes): Bytes representing the signature of the data\n\n        Raises:\n            ClientConnectionNotOpen: if the client connection is unusable\n            KmipOperationFailure: if the operation result is a failure\n            TypeError: if the input arguments are invalid\n        '
    if (not isinstance(data, six.binary_type)):
        raise TypeError('Data to be signed must be bytes.')
    if (uid is not None):
        if (not isinstance(uid, six.string_types)):
            raise TypeError('Unique identifier must be a string.')
    if (cryptographic_parameters is not None):
        if (not isinstance(cryptographic_parameters, dict)):
            raise TypeError('Cryptographic parameters must be a dictionary.')
    cryptographic_parameters = self._build_cryptographic_parameters(cryptographic_parameters)
    result = self.proxy.sign(data, uid, cryptographic_parameters)
    status = result.get('result_status')
    if (status == enums.ResultStatus.SUCCESS):
        return result.get('signature')
    else:
        raise exceptions.KmipOperationFailure(status, result.get('result_reason'), result.get('result_message'))
Create a digital signature for data using the specified signing key.

Args:
    data (bytes): The bytes of the data to be signed. Required.
    uid (string): The unique ID of the signing key to use.
        Optional, defaults to None.
    cryptographic_parameters (dict): A dictionary containing various
        cryptographic settings to be used for creating the signature
        (e.g., cryptographic algorithm, hashing algorithm, and/or
        digital signature algorithm). Optional, defaults to None.

Returns:
    signature (bytes): Bytes representing the signature of the data

Raises:
    ClientConnectionNotOpen: if the client connection is unusable
    KmipOperationFailure: if the operation result is a failure
    TypeError: if the input arguments are invalid
@is_connected
def sign(self, data, uid=None, cryptographic_parameters=None):
    '\n        Create a digital signature for data using the specified signing key.\n\n        Args:\n            data (bytes): The bytes of the data to be signed. Required.\n            uid (string): The unique ID of the signing key to use.\n                Optional, defaults to None.\n            cryptographic_parameters (dict): A dictionary containing various\n                cryptographic settings to be used for creating the signature\n                (e.g., cryptographic algorithm, hashing algorithm, and/or\n                digital signature algorithm). Optional, defaults to None.\n\n        Returns:\n            signature (bytes): Bytes representing the signature of the data\n\n        Raises:\n            ClientConnectionNotOpen: if the client connection is unusable\n            KmipOperationFailure: if the operation result is a failure\n            TypeError: if the input arguments are invalid\n        '
    if (not isinstance(data, six.binary_type)):
        raise TypeError('Data to be signed must be bytes.')
    if (uid is not None):
        if (not isinstance(uid, six.string_types)):
            raise TypeError('Unique identifier must be a string.')
    if (cryptographic_parameters is not None):
        if (not isinstance(cryptographic_parameters, dict)):
            raise TypeError('Cryptographic parameters must be a dictionary.')
    cryptographic_parameters = self._build_cryptographic_parameters(cryptographic_parameters)
    result = self.proxy.sign(data, uid, cryptographic_parameters)
    status = result.get('result_status')
    if (status == enums.ResultStatus.SUCCESS):
        return result.get('signature')
    else:
        raise exceptions.KmipOperationFailure(status, result.get('result_reason'), result.get('result_message'))