Generates a safe key for use with cache engine storage engines.

@param string $key the key passed over
@return bool|string string key or false
513264
public function key($key)
    {
        if (!$key) {
            return false;
        }

        $prefix = '';
        if ($this->_groupPrefix) {
            $prefix = md5(implode('_', $this->groups()));
        }

        $key = preg_replace('/[\s]+/', '_', strtolower(trim(str_replace([DIRECTORY_SEPARATOR, '/', '.'], '_', (string)$key))));

        return $prefix . $key;
    }
1077798
public static function genSign(string $key): string
    {
        return \base64_encode(\sha1(\trim($key) . self::SIGN_KEY, true));
    }
326455
public function generate($key)
	{
		$key = $result = preg_replace('/[^a-zA-Z0-9]+/', '', $key);

		$extra = sha1($_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT']);
		// time() is used for token expiration
		$token = base64_encode(time() . $extra . $this->randomString(32));
		$this->session->set($this->session_prefix . $key, $token);

		return $token;
	}
579329
protected static function encryptKey($key) {

        if ( isset($_SERVER['REMOTE_ADDR']) ) {

            $client_hash = md5($_SERVER['REMOTE_ADDR'].(isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : ''), true);

            $server_hash = md5($key, true);

            $cookie_key = $client_hash.$server_hash;

        } else {

            $cookie_key = hash('sha256', $key);

        }

        return $cookie_key;

    }
653183
private function getKeyPath($key)
    {
        $this->validateKey($key);
        $file = sha1($key);
        $this->hashDirectory->processFile($file);
        return $this->hashDirectory->getFileStoragePath();
    }
273756
protected function cleanKey($key)
    {
        return mb_substr(
            $key,
            mb_strlen($this->preDelimiter),
            mb_strlen($key) - mb_strlen($this->postDelimiter) - 1
        );
    }
582406
protected function getCache($key)
    {
        if (array_key_exists($key, $this->cache)) {
            return $this->cache[$key];
        }
        return false;
    }
976471
public function get($key)
	{
		$value = wincache_ucache_get($this->prefix.$key);

		if ($value !== false)
		{
			return $value;
		}
	}
106666
protected function generateIndexKey($cacheKey)
    {
        $cacheKeyStack = explode('.', $cacheKey);

        return implode('.', [
            $this->sanitizeCacheKeyPart($this->options['global_prefix']),
            $this->sanitizeCacheKeyPart($this->options['prefix']),
            $this->sanitizeCacheKeyPart($this->options['index_key']),
            $this->sanitizeCacheKeyPart($cacheKeyStack[2]), // filter
        ]);
    }
752032
protected function _normalizeKey($key)
    {
        try {
            return $this->_normalizeString($key);
        } catch (InvalidArgumentException $e) {
            throw $this->_createOutOfRangeException($this->__('Invalid key'), null, $e, $key);
        }
    }
337486
protected function _key($key)
    {
        $key = $this->key($key);
        if ($key === false) {
            throw new InvalidArgumentException('An empty value is not valid as a cache key');
        }

        return $this->_config['prefix'] . $key;
    }
566246
protected function checkKey($key):string{

		if(!is_string($key) || empty($key)){
			$msg = 'invalid cache key: "'.$key.'"';
			$this->logger->error($msg);

			throw new InvalidArgumentException($msg);
		}

		return $key;
	}
144703
public static function get($key) {

		$result = "";

		Artisan::call('config:cache');

		if($key) {
			$result = env($key);	
		}
		
		return $result;
	
	}
859401
protected function mysqlAesKey($key)
    {
        $newKey = str_repeat(chr(0), 16);

        for ($i = 0, $len = strlen($key); $i < $len; $i++) {
            $newKey[$i % 16] = $newKey[$i % 16] ^ $key[$i];
        }

        return $newKey;
    }
722738
private function getSchemaCache($key)
    {
        if (isset($this->model_schema_cache[$key])) {
            return $this->model_schema_cache[$key];
        }

        return false;
    }
247817
public function get($key)
    {
        if (isset($this->storage[$key])) {
            return $this->storage[$key];
        }
        return false;
    }
371088
private function key_to_hash($key)
    {
        if (null === $key) {
            $hash = 'null';

        } else if (is_int($key)) {
            $hash = $key;

        } else if (is_float($key)) {
            $hash = "f_$key";

        } else if (is_bool($key)) {
            $hash = "b_$key";

        } else if (is_string($key)) {
            $hash = "s_$key";

        } else if (is_object($key) || is_callable($key)) {
            $hash = spl_object_hash($key);

        } else if (is_array($key)) {
            $hash = 'a_' . md5(json_encode($key));

        } else if (is_resource($key)) {
            $hash = "r_$key";

        } else {
            throw new \InvalidArgumentException(sprintf(
                'Unsupported key type "%s"',
                gettype($key)
            ));
        }

        $this->map_hash_to_key[$hash] = $key;
        return $hash;
     }