'Generate an opaque to be returned to the client.  This is a unique
string that can be returned to us and verified.'

def _generateOpaque(self, nonce, clientip):

    now = intToBytes(int(self._getTime()))
    if (not clientip):
        clientip = ''
    elif isinstance(clientip, unicode):
        clientip = clientip.encode('ascii')
    key = ','.join((nonce, clientip, now))
    digest = hexlify(md5((key + self.privateKey)).digest())
    ekey = base64.b64encode(key)
    return '-'.join((digest, ekey.replace('\n', '')))
