'Send response to a challenge.
@param data: client response.
@type data: L{bytes}.'

def sendResponse(self, data=''):

    response = domish.Element((NS_XMPP_SASL, 'response'))
    if data:
        response.addContent(b64encode(data).decode('ascii'))
    self.xmlstream.send(response)
