Checks if key is valid length after format and sanitization is done.

@since  1.0.0

@param  string $key The API key to check.

@return bool        Is the key valid?
483081
public function isValid( $key = null ) {
		$key = $key ? $this->sanitizeKey( $key ) : $this->getKey();
		return strlen( $key ) === 35;
	}
868197
protected function isMappedKey($key)
    {
        return substr($key, 0, strlen($this->getStartMapDelimiter())) == $this->getStartMapDelimiter()
            && substr($key, -strlen($this->getEndMapDelimiter())) == $this->getEndMapDelimiter();
    }
955785
public function containsKey(string $key): bool
    {
        if (isset($this->orgData[$key])) {
            return ! isset($this->removeAttributes[$key]);
        } else {
            return isset($this->addAttributes[$key]);
        }
    }
740819
protected function isIp($key) : bool
    {
        if (filter_var($this->param[$key], FILTER_VALIDATE_IP) === false) {
            $this->errors[$key.self::ERROR] =
                ucfirst($this->convertToFieldName($key)).' is not valid '.lcfirst(
                    str_replace('is', '', __FUNCTION__)
                );

            return false;
        }

        return true;
    }
604318
public static function pad($key)
    {
        // key is too large
        if (strlen($key) > 32) {
            return false;
        }

        // set sizes
        $sizes = array(16, 24, 32);

        // loop through sizes and pad key
        foreach ($sizes as $s) {
            while (strlen($key) < $s) {
                $key = $key."\0";
            }
            if (strlen($key) == $s) {
                break;
            } // finish if the key matches a size
        }

        return $key;
    }
540138
public function isValid($key = null)
    {
        if (parent::isValid() && $this->getKey()) {
            return $key && $this->getKey() && $this->chiper->decrypt($this->getKey()) == $this->chiper->decrypt($key);
        }

        return false;
    }
802531
public function has($key)
    {
        $values = $this->readFileContents();

        if (!array_key_exists($key, $values)) {
            return false;
        }

        $value = $values[$key];

        return (!$this->hasExpired($value[static::TTL], $value[static::CREATE_TIME]));
    }
1223984
public function isValid($key = null)
    {
        if (parent::isValid()) {
            if ($key && parent::getKey() && parent::getKey() == $key) {
                return true;
            }
        }

        return false;
    }
736892
public function isValid($key = null)
    {
        return $key && $this->key && $this->chiper->decrypt($this->key) == $this->chiper->decrypt($key);
    }
1107828
private function validateKey($key)
    {
        if (!is_string($key) || $key === '') {
            throw new CacheException('Argument $key must be a valid non-empty string.');
        }
        if (strpbrk($key, '{}()/\@:') !== false) {
            throw new CacheException(sprintf('Key "%s" contains unsupported characters.', $key));
        }
    }
433328
public function has(string $key): bool
    {
        $key = $this->prepareKey($key);
        return Arr::has($this->properties, $key);
    }
1239417
public function has($key)
    {
        if (!$this->isEnabled()) {
            return false;
        }

        return (false !== apc_fetch($this->prefix() . $key));
    }
374306
public static function validateKey ($key)
    {
        $hash = substr($key, 0, 2);
        $encrypted = substr($key, 2);
        if ($hash != substr(md5(Pluf::f('secret_key') . $encrypted), 0, 2)) {
            throw new Pluf_Form_Invalid(
                    __(
                            'The validation key is not valid. Please copy/paste it from your confirmation email.'));
        }
        $cr = new Pluf_Crypt(md5(Pluf::f('secret_key')));
        return explode(':', $cr->decrypt($encrypted), 3);
    }
856790
public function has(string $key): bool
    {
        if (array_key_exists($key, $this->ttl) &&
            $this->time() - $this->ttl[$key] > 0
        ) {
            unset($this->ttl[$key]);
            unset($this->storage[$key]);

            return false;
        }

        return array_key_exists($key, $this->storage);
    }
204401
protected function isAllowedKey($key): bool
    {
        return empty($this->allowedKeys) || \in_array($key, $this->allowedKeys, true);
    }
742081
protected function required(string $key) : bool
    {
        $val = $this->param[$key];

        if (is_string($val) && strlen(trim($val)) == 0) {
            $this->errors[$key.self::ERROR] =
                ucfirst($this->convertToFieldName($key)).' is required';

            return false;
        } elseif (is_array($val) && count($val) < 1) {
            $this->errors[$key.self::ERROR] =
                ucfirst($this->convertToFieldName($key)).' is required';

            return false;
        }

        return true;
    }
481500
public function isEmptyFile($key)
    {
        $conCate = '';
        $columnName = ucfirst($this->convertToFieldName($key)).' has ';

        $files = $this->fileName($key);

        if ($files['size'] == 0 && $files['error'] == 0) {
            $this->errors[$key.static::ERROR] = $conCate.$columnName.' empty file.';

            return false;
        }

        return true;
    }