(self, gpg, sign_key)
Clearsign the data

        Unlike the other methods in this class, this method overwrites the
        original data container. The rationale is that, in this case, the
        actual message to be delivered to the recipient becomes the clearsigned
        one, including the signature.

        This method should be used in plaintext mode only. In contrast, in
        encryption mode, the signature should be enabled on the call to method
        "encrypt" instead.

        Args:
            gpg      : Gpg object.
            sign_key : Fingerprint to use for signing. If set to None, try with
                       the first private key on the keyring.
Clearsign the data
Clearsign the data
def clearsign(self, gpg, sign_key):
        """Clearsign the data

        Unlike the other methods in this class, this method overwrites the
        original data container. The rationale is that, in this case, the
        actual message to be delivered to the recipient becomes the clearsigned
        one, including the signature.

        This method should be used in plaintext mode only. In contrast, in
        encryption mode, the signature should be enabled on the call to method
        "encrypt" instead.

        Args:
            gpg      : Gpg object.
            sign_key : Fingerprint to use for signing. If set to None, try with
                       the first private key on the keyring.

        """
        data = self.data['original']

        logger.debug("Sign message using key %s" % (sign_key))

        signed_obj = gpg.sign(data, sign_key)

        logger.debug("Signed version of the data structure has %d bytes" %
                     (len(signed_obj.data)))

        self.data['original'] = signed_obj.data
def clearsign ( self , gpg , sign_key ) : data = self . data [ 'original' ] logger . debug ( "Sign message using key %s" % ( sign_key ) ) signed_obj = gpg . sign ( data , sign_key ) logger . debug ( "Signed version of the data structure has %d bytes" % ( len ( signed_obj . data ) ) ) self . data [ 'original' ] = signed_obj . data