Calculates the key we use in the "trace" array for a given request.
498371
private function getTraceKey(Request $request): string
    {
        $path = $request->getPathInfo();
        if ($qs = $request->getQueryString()) {
            $path .= '?'.$qs;
        }

        return $request->getMethod().' '.$path;
    }
39075
def verify_authentication_data(self, key):
        '''
        
        '''
        correct_authentication_data = self.calculate_authentication_data(key)
        return self.authentication_data == correct_authentication_data
835664
private void maybeMarkCurrentKeyAsUsed(DeterministicKey key) {
        // It's OK for currentKeys to be empty here: it means we're a married wallet and the key may be a part of a
        // rotating chain.
        for (Map.Entry<KeyChain.KeyPurpose, DeterministicKey> entry : currentKeys.entrySet()) {
            if (entry.getValue() != null && entry.getValue().equals(key)) {
                log.info("Marking key as used: {}", key);
                currentKeys.put(entry.getKey(), freshKey(entry.getKey()));
                return;
            }
        }
    }
87646
private String hashKeyForDisk(LoaderRequest request) {
        String key = request.getCacheKey();

        // We don't except to have a lot of threads
        // so it's okay to synchronize access
        synchronized (hasher) {
            return hasher.hash(key);
        }
    }
1301842
private Map<String, Set<String>> getParameters(HttpServletRequest request) {
        Map<String, String[]> params = request.getParameterMap();

        Map<String, Set<String>> queryParameters = new HashMap<>(params.size());
        for (Map.Entry<String, String[]> entry : params.entrySet()) {
            queryParameters.put(entry.getKey(), new HashSet<>(Arrays.asList(entry.getValue())));
        }
        return queryParameters;
    }
1076029
def _update_keycache(self, *args, forward):
        """"""
        entity, key, branch, turn, tick, value = args[-6:]
        parent = args[:-6]
        kc = self._get_keycache(parent + (entity,), branch, turn, tick, forward=forward)
        if value is None:
            kc = kc.difference((key,))
        else:
            kc = kc.union((key,))
        self.keycache[parent+(entity, branch)][turn][tick] = kc
81243
def requestUnOrdered(self, key: str):
        
        now = time.perf_counter()
        if self.acc_monitor:
            self.acc_monitor.update_time(now)
            self.acc_monitor.request_received(key)
        self.requestTracker.start(key, now)
339246
String computeCacheKey(Class cls, String methodName, String argpart) {
		String cachekey = keyMaker.getMd5(cls.getName() + "." + methodName);
		if (!argpart.isEmpty()) {
			cachekey += "_" + keyMaker.getMd5(argpart);
		}
		logger.debug("CACHEID : {}.{}_{} = {}", cls.getName(), methodName, argpart, cachekey);
		return cachekey;
	}
1105375
def process_request(self, request):
        
        if self._is_enabled():
            self._cache.set(self.guid_key, six.text_type(uuid4()))
            log_prefix = self._log_prefix(u"Before", request)
            self._cache.set(self.memory_data_key, self._memory_data(log_prefix))
618651
private function path_tracer() {
		
		//TODO: consider working out how to trace paths one at a time, so the list of valid paths comes back in a more predictable manner.
		
		$tracerData = array();
		$this->validPaths = array();
		//build the initial tracerData for exploring the depths of this beastly array...
		foreach($this->data as $path=>$data) {
			if(is_array($data)) {
				$tracerData[] = array(
					'path'	=> "/". $path,
					'data'	=> $data
				);
			}
			else {
				//initial key ($path) doesn't have an array beneath it, so it's a blank root path.
				$this->validPaths[] = '/'. $path;
			}
		}
		
		//If we have anything left, we'll need to do some crazy while() looping madness.
		if(is_array($tracerData) && count($tracerData)) {
			while($myData = array_shift($tracerData)) {
				if(is_array($myData['data']) && count($myData['data'])) {
					$basePath = $myData['path'];
					foreach($myData['data'] as $key=>$val) {
						$tracerData[] = array(
							'path'	=> $basePath .'/'. $key,
							'data'	=> $val
						);
					}
				}
				else {
					$this->validPaths[] = $myData['path'];
				}
			}
		}
		
		
	}
816863
public int computeIfAbsent(final int key, final IntUnaryOperator mappingFunction)
    {
        int value = get(key);
        if (value == missingValue)
        {
            value = mappingFunction.applyAsInt(key);
            if (value != missingValue)
            {
                put(key, value);
            }
        }

        return value;
    }
295188
def calculate_authentication_data(self, key):
        '''
        
        '''
        # This one is easy
        if self.key_id == KEY_ID_NONE:
            return ''

        # Determine the digestmod and how long the authentication data will be
        if self.key_id == KEY_ID_HMAC_SHA_1_96:
            digestmod = hashlib.sha1
            data_length = 20
        elif self.key_id == KEY_ID_HMAC_SHA_256_128:
            digestmod = hashlib.sha256
            data_length = 32
        else:
            raise ValueError('Unknown Key ID')

        # Fill the authentication data with the right number of zeroes
        # after storing the original first so we can restore it later
        current_authentication_data = self.authentication_data
        self.authentication_data = '\x00' * data_length

        # Build the packet
        msg = self.to_bytes()

        # Restore the authentication data
        self.authentication_data = current_authentication_data

        # Return the authentication data based on the generated packet
        # and the given key
        return hmac.new(key, msg, digestmod).digest()
166004
def api_keys(self, serverid, api_key):
        
        if serverid and api_key:
            self.can_query = True # Yes, we _are_ (will be) configured
        self.serverid = int(serverid)
        self.api_key = api_key
        self.webhook_url = self.__base_url + str(self.serverid) + '/' + self.api_key
955631
public void markPubKeyAsUsed(byte[] pubkey) {
        if (chains != null) {
            for (DeterministicKeyChain chain : chains) {
                DeterministicKey key;
                if ((key = chain.markPubKeyAsUsed(pubkey)) != null) {
                    maybeMarkCurrentKeyAsUsed(key);
                    return;
                }
            }
        }
    }
490045
def handle_set_key(self):
        """"""
        track_id = self.reader.int()
        row = self.reader.int()
        value = self.reader.float()
        kind = self.reader.byte()
        logger.info(" -> track=%s, row=%s, value=%s, type=%s", track_id, row, value, kind)

        # Add or update track value
        track = self.tracks.get_by_id(track_id)
        track.add_or_update(row, value, kind)
16572
public V get(K key)
  {
    Object okey = key;
    if (okey == null)
      okey = NULL;

    int hash = (okey.hashCode() & 0x7fffffff) % _prime;

    CacheItem<K,V> item;

    for (item = _entries[hash];
         item != null;
         item = item._nextHash) {
      Object itemKey = item._key;

      if (itemKey == okey || itemKey.equals(okey)) {
        updateLru(item);

        if (_isEnableStatistics)
          _hitCount++;

        return item._value;
      }
    }

    if (_isEnableStatistics) {
      _missCount++;
    }

    return null;
  }
406589
function calculateAuthKeyValue(context) {
    var ga = context.serverDHInnerData.g_a;
    var b = context.b;
    var dhPrime = context.serverDHInnerData.dh_prime;
    var authKeyValue = utility.modPow(ga, b, dhPrime);
    if (logger.isDebugEnabled()) {
        logger.debug('authKeyValue(%s) = %s', authKeyValue.length, authKeyValue.toString('hex'));
    }
    context.authKeyValue = authKeyValue;
    return context;
}