'Encrypt a string, returning a tuple of (encrypted_data, encryption_data).
These can be passed to decrypt to get back the original string.'

def encrypt(self, data):

    pkg_size_info = self.ctxt.QueryContextAttributes(sspicon.SECPKG_ATTR_SIZES)
    trailersize = pkg_size_info['SecurityTrailer']
    encbuf = win32security.PySecBufferDescType()
    encbuf.append(win32security.PySecBufferType(len(data), sspicon.SECBUFFER_DATA))
    encbuf.append(win32security.PySecBufferType(trailersize, sspicon.SECBUFFER_TOKEN))
    encbuf[0].Buffer = data
    self.ctxt.EncryptMessage(0, encbuf, self._get_next_seq_num())
    return (encbuf[0].Buffer, encbuf[1].Buffer)
