Validates checksum of esi request

@param array $data
@return bool
429896
public function validateChecksum($data)
    {
        if (!isset($data['checksum']) || !$this->getEsiKey()) {
            return false;
        }

        $suppliedChecksum = $data['checksum'];
        unset($data['checksum']);
        return $suppliedChecksum === $this->getChecksum($data);
    }
24494
public function isValid($data) {
        if (!is_array($data)) {
            throw new Zend_Form_Exception(__METHOD__ . ' expects an array');
        }

        $this->_incrementArray($data);
        return parent::isValid($data);
    }
1007930
public function create(array $data)
    {
        if ( $this->validator->with($data)->passes() )
        {
            $data['permissions'] = explode(',', $data['permissions']);
            $this->permission->create($data);
            return true;
        }
        else
        {
            return false;
        }
    }
648857
public function getIsAllKeysValid(array $data)
    {
        $keys = array_keys($data);
        foreach($keys as $key)
        {
            if(!$this->getIsValidKey($key))
            {
                return false;
            }
        }
        return true;
    }
1368519
public function validate(array $data)
    {
        $validator = $this->getValidator();
        if (!$validator->count()) {
            $method = new ReflectionMethod($this, 'validator');
            if ($method->getDeclaringClass()->getName() !== __CLASS__) {
                $validator = $this->validator();
            }
        }
        $this->_errors = $validator->errors($data);

        return count($this->_errors) === 0;
    }
216935
public static function validate($data)
    {
        if (count(array_intersect_key(array_flip(static::$requiredParams), $data)) === count(static::$requiredParams)) {
            return true;
        }

        throw new InvalidArgumentException();
    }
1208394
protected function validate_by_callbacks( array $data, array $callbacks ) {
		foreach ( $callbacks as $key => $callback ) {
			$validity = new WP_Error;

			$value = array_key_exists( $key, $data ) ? $data[ $key ] : null;
			$callback( $validity, $value );

			if ( is_wp_error( $validity ) && count( $validity->errors ) > 0 ) {
				$this->add_error( $key, $validity->get_error_messages() );
			}
		}
	}
839586
public static function validate($data) {
        if ( ! is_array($data) ) return '$data must be an array';
        $id = U::get($data, 'id');
        if ( $id ) {
            if ( ! is_int($id) ) return "id must be an an integer";
        }
        $uk1 = U::get($data, 'uk1');
        if ( $uk1 ) {
            if ( ! is_string($uk1) ) return "uk1 must be a string";
            if ( strlen($uk1) < 1 || strlen($uk1) > 150 ) return "uk1 must be no more than 150 characters";
        }
        $sk1 = U::get($data, 'sk1');
        if ( $sk1 ) {
            if ( ! is_string($sk1) ) return "sk1 must be a string";
            if ( strlen($sk1) < 1 || strlen($sk1) > 75 ) return "sk1 must be no more than 75 characters";
        }
        $tk1 = U::get($data, 'tk1');
        if ( $tk1 ) {
            if ( ! is_string($tk1) ) return "tk1 must be a string";
            if ( strlen($tk1) < 1 ) return "tk1 cannot be empty";
        }
        $co1 = U::get($data, 'co1');
        if ( $co1 ) {
            if ( ! is_string($co1) ) return "co1 must be a string";
            if ( strlen($co1) < 1 || strlen($co1) > 150 ) return "co1 must be no more than 150 characters";
        }
        $co2 = U::get($data, 'co2');
        if ( $co2 ) {
            if ( ! is_string($co2) ) return "co2 must be a string";
            if ( strlen($co2) < 1 || strlen($co2) > 150 ) return "co2 must be no more than 150 characters";
        }
        return true;
    }
216875
public function validate($data) {
    if ($data === NULL) throw $this->emptyException();
    if (!is_array($data)) throw $this->invalidArgument(1, $data, 'Array', __FUNCTION__);
    
    foreach ($this->languages as $lang) {
      if (!array_key_exists($lang, $data)) {
        throw $this->emptyException();
      }
      
      try {
        $data[$lang] = $this->wrappedRule->validate($data[$lang]);
      } catch (EmptyDataException $e) {
        throw $this->emptyException($e);
      }
    }
    
    return $data;
  }
54655
protected function parseArrayOfPrimaryData(array $data)
    {
        $isValid = true;
        $result  = null;
        foreach ($data as $primaryData) {
            $parsed = $this->parseSinglePrimaryData($primaryData);
            if ($parsed === null) {
                $isValid = false;
            } else {
                $result[] = $parsed;
            }
        }

        return $isValid === true ? $result : null;
    }
924696
public function validate($data) {
        if (empty($data)) {
            return true;
        }

        try {
            \core_auth\digital_consent::parse_age_digital_consent_map($data);
        } catch (\moodle_exception $e) {
            return get_string('invalidagedigitalconsent', 'admin', $e->getMessage());
        }

        return true;
    }
1058193
public function validate($data) {
        $result = parent::validate($data);
        if ($result !== true) {
            return $result;
        }
        $runningmethod = get_config('antivirus_clamav', 'runningmethod');
        if ($runningmethod === 'unixsocket') {
            $socket = stream_socket_client('unix://' . $data, $errno, $errstr, ANTIVIRUS_CLAMAV_SOCKET_TIMEOUT);
            if (!$socket) {
                return get_string('errorcantopensocket', 'antivirus_clamav', "$errstr ($errno)");
            } else {
                // Send PING query to ClamAV socket to check its running state.
                fwrite($socket, "nPING\n");
                $response = stream_get_line($socket, 4);
                fclose($socket);
                if ($response !== 'PONG') {
                    return get_string('errorclamavnoresponse', 'antivirus_clamav');
                }
            }
        }
        return true;
    }
253720
protected function isDataValid($data)
    {
        $this->parser->dataExpire = $this->dataExpire;

        return parent::isDataValid($data);
    }
966801
private function isRemoteImage(array $data)
    {
        return isset($data['image']['file']) && is_string($data['image']['file']) &&
            (!strncasecmp('http://', $data['image']['file'], 7) || !strncasecmp('https://', $data['image']['file'], 8));
    }
1121457
public function validate()
    {
        if ($_SERVER['REQUEST_METHOD'] != 'GET') {
            $this->_logger->log("Invalid request method", Icepay_Api_Logger::ERROR);
            return false;
        }

        $this->_logger->log(sprintf("Page data: %s", serialize($_GET)), Icepay_Api_Logger::NOTICE);

        $this->data->status = (isset($_GET['Status'])) ? $_GET['Status'] : "";
        $this->data->statusCode = (isset($_GET['StatusCode'])) ? $_GET['StatusCode'] : "";
        $this->data->merchant = (isset($_GET['Merchant'])) ? $_GET['Merchant'] : "";
        $this->data->orderID = (isset($_GET['OrderID'])) ? $_GET['OrderID'] : "";
        $this->data->paymentID = (isset($_GET['PaymentID'])) ? $_GET['PaymentID'] : "";
        $this->data->reference = (isset($_GET['Reference'])) ? $_GET['Reference'] : "";
        $this->data->transactionID = (isset($_GET['TransactionID'])) ? $_GET['TransactionID'] : "";
        $this->data->checksum = (isset($_GET['Checksum'])) ? $_GET['Checksum'] : "";

        if ($this->generateChecksumForPage() != $this->data->checksum) {
            $this->_logger->log("Checksum does not match", Icepay_Api_Logger::ERROR);
            return false;
        }

        return true;
    }
1020648
public function validate(array $data)
    {
        $validator = $this->getValidator();
        if (!$validator->count()) {
            //@codingStandardsIgnoreStart
            $validator = @$this->validator();
        }
        $this->_errors = $validator->errors($data);

        return count($this->_errors) === 0;
    }
1306959
public function check($data = null)
    {
        $validator = $this->getValidator($data);

        if ($validator->isValid()) {
            return $this->suc();
        } else {
            return $this->err($validator->getFirstMessage());
        }
    }