'Generates a new random, unique nonce to use for authentication.'

@utils.Synchronized
def NewNonce(self):

    now = time.time()
    if (len(self.nonces) >= self.MAX_NONCES):
        self._InvalidateOldNonces(now)
        return None
    nonce = str(uuid.uuid4())
    if (nonce in self.nonces):
        return None
    if (len(self.nonces) >= (self.MAX_NONCES / 10)):
        self._InvalidateOldNonces(now)
    self.nonces[nonce] = now
    return nonce
