Returns checksum from the configuration files.

You can set $this->checksum = false to disable this check.

@return bool|string
4954
public function checksum()
    {
        if (null === $this->checksum) {
            $this->checksum = md5(json_encode($this->files) . $this->version);
        }

        return $this->checksum;
    }
787811
public function checksum()
    {
        $properties = Serialize::encode($this->properties);
        $calls = Serialize::encode($this->getSanitizedCalls());

        return \md5($properties . $calls);
    }
234485
public function check()
    {
        $result = false;

        $version = $this->dataService->getVersion();

        // Check the version. If this is > 0 then it seems to be a version number like 1.2.3
        // Because the getVersion method can return an error like
        //      Warning: Identity file /Users/agrunwald/.ssh/id_rsa_config not accessible: No such file or directory.
        //      Permission denied (publickey).
        //
        if ($version && version_compare($version, 0, '>')) {
            $this->version = $version;
            $result = true;
        }

        return $result;
    }
761750
public function getCommand()
    {
        $options = $this->defaultOptions;

        if ($this->options !== null) {
            $options = $this->options;
        }

        if ($this->verbose === true) {
            $options .= ' --verbose';
        }

        if ($this->checksum === true) {
            $options .= ' --checksum';
        }

        if ($this->identityFile !== null) {
            $options .= ' -e "ssh -i ' . $this->identityFile . ' -p' . $this->remotePort . '"';
        } else {
            if ($this->remoteShell !== null) {
                $options .= ' -e "' . $this->remoteShell . '"';
            }
        }

        if ($this->dryRun === true) {
            $options .= ' --dry-run';
        }

        if ($this->delete === true) {
            $options .= ' --delete-after --ignore-errors --force';
        }

        if ($this->itemizeChanges === true) {
            $options .= ' --itemize-changes';
        }
        if ($this->backupDir !== null) {
            $options .= ' -b --backup-dir="' . $this->backupDir . '"';
        }

        if ($this->exclude !== null) {
            //remove trailing comma if any
            $this->exclude = trim($this->exclude, ',');
            $options .= ' --exclude="' . str_replace(',', '" --exclude="', $this->exclude) . '"';
        }

        if ($this->excludeFile !== null) {
            $options .= ' --exclude-from="' . $this->excludeFile . '"';
        }

        $this->setOptions($options);

        $options .= ' "' . $this->sourceDir . '" "' . $this->destinationDir . '"';

        escapeshellcmd($options);
        $options .= ' 2>&1';

        return $this->rsyncPath . ' ' . $options;
    }
86917
public function getHashCode() {
		if ($this->_isSupervisor) {
			return $this->getSharedComponent()->getHashCode();
		}
		return md5(
			  $this->getFillType()
			. $this->getRotation()
			. $this->getStartColor()->getHashCode()
			. $this->getEndColor()->getHashCode()
			. __CLASS__
		);
	}
392284
public function getVerifier()
    {
        if ( ! empty($this->key) && ! empty($this->secret)) {
            $key = rawurlencode($this->key);
            $secret = rawurlencode($this->secret);

            return base64_encode($key . ':' . $secret);
        }

        return false;
    }
877011
private function getTableChecksum($tables)
    {
        $tables = is_array($tables) ? $tables : array($tables);
        $database = \OxidEsales\Eshop\Core\DatabaseProvider::getMaster(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
        $query = 'CHECKSUM TABLE ' . implode(", ", $tables);
        $results = $database->getAll($query);

        $databaseName = \OxidEsales\Eshop\Core\Registry::getConfig()->getConfigParam('dbName');
        $checksum = array();
        foreach ($results as $result) {
            $table = str_replace($databaseName . '.', '', $result['Table']);
            $checksum[$table] = $result['Checksum'];
        }

        return $checksum;
    }
501187
protected function calculateChecksum() {
        // Calculating Checksum
        // Consider the right-most digit of the message to be in an "odd" position,
        // and assign odd/even to each character moving from right to left
        // Odd Position = 3, Even Position = 9
        // Multiply it by the number
        // Add all of that and do ?mod10
        $odd = true;
        $this->checksumValue = 0;
        $c = strlen($this->text);
        for ($i = $c; $i > 0; $i--) {
            if ($odd === true) {
                $multiplier = 3;
                $odd = false;
            } else {
                $multiplier = 9;
                $odd = true;
            }

            if (!isset($this->keys[$this->text[$i - 1]])) {
                return;
            }

            $this->checksumValue += $this->keys[$this->text[$i - 1]] * $multiplier;
        }

        $this->checksumValue = $this->checksumValue % 10;
    }
959359
protected function getConfigFormat()
    {
        $conf = $this->username;
        if (!empty($this->server)) {
            $conf .= ';'.$this->server;
        }

        $conf .= ' '.$this->password;

        if (!empty($this->alias)) {
            $conf .= ' '.$this->alias;
        }

        return $conf;
    }
426288
public function getConfigFile() : string
    {
        if (empty($this->configFile)) {
            $this->configFile = getcwd() . DIRECTORY_SEPARATOR . CH::CONFIG;
        }
        return $this->configFile;
    }
303951
protected function _getUnoconvConfig() {
		$cfgUnoconv = $this->_modelConfigTheme->getUnoconvConfig();
		if (empty($cfgUnoconv)) {
			return false;
		}

		$timeout = (int)Hash::get($cfgUnoconv, 'timeout');
		$binaries = (string)Hash::get($cfgUnoconv, 'binaries');

		$result = compact('timeout', 'binaries');

		return $result;
	}
869532
public function getConfigurationValidationResult()
    {
        if (null === $this->configurationValidationResult
            || $this->lastConfigurationHash !== $this->formObject->getHash()
        ) {
            $configurationObject = $this->getConfigurationObject();
            $this->configurationValidationResult = $this->refreshConfigurationValidationResult($configurationObject);
        }

        return $this->configurationValidationResult;
    }
425172
private function getDumpChecksum()
    {
        $dumpName = $this->getDumpName();
        $checksum = $this->getChecksum();

        return array_key_exists($dumpName, $checksum)? $checksum[$dumpName] : array();
    }
1222647
public function getPackages()
    {
        if(empty($this->packages)) {
            
            $xml = $this->getXmlContent();
            foreach($xml->packages->package as $package)
            {
                $data = (array)$package;
                extract($data['@attributes']);
                // checksums may not exist on some remote packages
                if(!isset($checksum)) {
                    $checksum = null;
                }                
                $this->packages[] = new Package($id, $checksum, $name, $subdir, $unzip, $url);
            }            
        }
        return $this->packages;
                
    }
461900
public function getBytes()
    {
        if ($this->isDirty && $this->bytes) {
            return $this->bytes;
        }
        if ($this->isDirty && $this->filename) {
            return file_get_contents($this->filename);
        }
        if ($this->riakGridFSFile instanceof \RiakGridFSFile) {
            return $this->riakGridFSFile->getBytes();
        }
        return null;
    }
344865
private function getChecksumsMiddleware()
    {
        return function (callable $handler) {
            return function (
                CommandInterface $command,
                RequestInterface $request = null
            ) use ($handler) {
                // Accept "ContentSHA256" with a lowercase "c" to match other Glacier params.
                if (!$command['ContentSHA256'] && $command['contentSHA256']) {
                    $command['ContentSHA256'] = $command['contentSHA256'];
                    unset($command['contentSHA256']);
                }

                // If uploading, then make sure checksums are added.
                $name = $command->getName();
                if (($name === 'UploadArchive' || $name === 'UploadMultipartPart')
                    && (!$command['checksum'] || !$command['ContentSHA256'])
                ) {
                    $body = $request->getBody();
                    if (!$body->isSeekable()) {
                        throw new CouldNotCreateChecksumException('sha256');
                    }

                    // Add a tree hash if not provided.
                    if (!$command['checksum']) {
                        $body = new HashingStream(
                            $body, new TreeHash(),
                            function ($result) use ($command, &$request) {
                                $request = $request->withHeader(
                                    'x-amz-sha256-tree-hash',
                                    bin2hex($result)
                                );
                            }
                        );
                    }

                    // Add a linear content hash if not provided.
                    if (!$command['ContentSHA256']) {
                        $body = new HashingStream(
                            $body, new PhpHash('sha256'),
                            function ($result) use ($command) {
                                $command['ContentSHA256'] = bin2hex($result);
                            }
                        );
                    }

                    // Read the stream in order to calculate the hashes.
                    while (!$body->eof()) {
                        $body->read(1048576);
                    }
                    $body->seek(0);
                }

                // Set the content hash header if a value is in the command.
                if ($command['ContentSHA256']) {
                    $request = $request->withHeader(
                        'x-amz-content-sha256',
                        $command['ContentSHA256']
                    );
                }

                return $handler($command, $request);
            };
        };
    }
214657
public function getDumpFilePath () : string
    {
        $dir = dirname($this->filePath);
        $fileName = \basename($this->filePath, ".{$this->fileType}");

        $dir = "." === $dir
            ? ""
            : "{$dir}/";

        $hash = !empty($this->fileNameHash)
            ? ".{$this->fileNameHash}"
            : "";

        return "{$dir}{$fileName}{$hash}.{$this->fileType}";
    }