'Sign a given message.'

def Sign(self, message, use_pss=False):

    if (not use_pss):
        padding_algorithm = padding.PKCS1v15()
    else:
        padding_algorithm = padding.PSS(mgf=padding.MGF1(hashes.SHA256()), salt_length=padding.PSS.MAX_LENGTH)
    signer = self._value.signer(padding_algorithm, hashes.SHA256())
    signer.update(message)
    return signer.finalize()
