Get checksum algorithm.

@return string|null
556893
public function getChecksumAlgorithm() : ?string
    {
        $checksumHeader = $this->getRequest()->header('Upload-Checksum');

        if (empty($checksumHeader)) {
            return self::DEFAULT_CHECKSUM_ALGORITHM;
        }

        list($checksumAlgorithm, /* $checksum */) = explode(' ', $checksumHeader);

        return $checksumAlgorithm;
    }
1100957
public static String getChecksum(String algorithm, byte[] bytes) {
        final MessageDigest digest = getMessageDigest(algorithm);
        final byte[] b = digest.digest(bytes);
        return getHex(b);
    }
901669
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->name,
            $this->titles->calculateHash(),
            $this->descriptions->calculateHash(),
            $this->author,
            $this->version,
            $this->fileName,
            $this->directoryName,
            array_map(function (Dependency $dependency): string {
                return $dependency->calculateHash();
            }, $this->dependencies),
            $this->thumbnailHash,
            $this->checksum,
            $this->order,
        ]);
    }
1257730
public function checksums(array $checksums = null) {
        if ($checksums === null) {
            return $this->checksums;
        }

        $this->checksums = $checksums;

        return $this;
    }
1370612
public function getHashCode() {
    	return md5(
    		  $this->_path
    		. $this->_name
    		. $this->_offsetX
    		. $this->_offsetY
    		. $this->_width
    		. $this->_height
    		. __CLASS__
    	);
    }
915879
public function getPkv()
    {
        $pk = $this->getPk();

        try {
            if (is_array($pk)) {
                $pkv = [];
                foreach ($pk as $pkItem) {
                    $val = $this->getAttrVal($pkItem);
                    $pkv[$pkItem] = $val;
                }
            } else {
                $pkv = $this->getAttrVal($pk);
            }
        } catch (\Exception $e) {
            return null;
        }

        return $pkv;
    }
449195
public function verifyChecksum()
    {
        if(empty($this->getPackage()->getChecksum())) {
            return true;
        }
        return $this->getPackage()->getChecksum() === md5_file($this->getDownloadFullPath());
    }
474693
protected function processChecksum() {
        if ($this->checksumValue === false) { // Calculate the checksum only once
            $this->calculateChecksum();
        }

        if ($this->checksumValue !== false) {
            return $this->keys[$this->checksumValue];
        }

        return false;
    }
1300541
private function getGccVersion()
    {
        if (is_windows()) {
            return '0.0.0';
        }

        if ($this->filesystem->exists('gcc-version')) {
            return $this->filesystem->read('gcc-version');
        }

        $this->filesystem->system('gcc -dumpversion', 'stdout', 'gcc-version');
        $lines = $this->filesystem->file('gcc-version');
        $lines = array_filter($lines);

        $lastLine = $lines[\count($lines) - 1];
        if (preg_match('/\d+\.\d+\.\d+/', $lastLine, $matches)) {
            return $matches[0];
        }

        return '0.0.0';
    }
460545
protected function calculateChecksum() {
        // Checksum
        // First Char (START)
        // + Starting with the first data character following the start character,
        // take the value of the character (between 0 and 102, inclusive) multiply
        // it by its character position (1) and add that to the running checksum.
        // Modulated 103
        $this->checksumValue = $this->indcheck[0];
        $c = count($this->indcheck);
        for ($i = 1; $i < $c; $i++) {
            $this->checksumValue += $this->indcheck[$i] * $i;
        }

        $this->checksumValue = $this->checksumValue % 103;
    }
471575
public function getCommonPrefix()
    {
        if ($this->count() == 0) {
            return null;
        }

        $commonPath = $this->reduce(function ($commonPath, FileNodeInterface $file) {
            if (is_null($commonPath)) {
                return $file->getPath();
            }
            return $this->getCommonPrefixString($commonPath, $file->getPath());
        });

        return (strlen($commonPath) > 0) ? $commonPath : null;
    }
1000392
protected function calculateChecksum() {
        $this->checksumValue = 0;
        $c = strlen($this->text);
        for ($i = 0; $i < $c; $i++) {
            $this->checksumValue += $this->findIndex($this->text[$i]);
        }

        $this->checksumValue = $this->checksumValue % 43;
    }
1011934
public function getSystemKey()
    {
        return isset($this->encryptedKeys[self::SYSTEM_IDENTIFIER])
            ? $this->encryptedKeys[self::SYSTEM_IDENTIFIER]
            : null;
    }
169446
public function getCheckDigits()
    {
        $checkDigits = '';
        $iban = $this->getIban();
        if (!empty($iban)) {
            $checkDigits = substr($iban, 2, 2);
        }
        return $checkDigits;
    }
1299685
public static String getChecksum(InputStream is, String algorithm) throws IOException {

		if (algorithm.equals(JawrConstant.CRC32_ALGORITHM)) {
			return getCRC32Checksum(is);
		} else if (algorithm.equals(JawrConstant.MD5_ALGORITHM)) {
			return getMD5Checksum(is);
		} else {
			throw new BundlingProcessException("The checksum algorithm '" + algorithm + "' is not supported.\n"
					+ "The only supported algorithm are 'CRC32' or 'MD5'.");
		}
	}
658034
public function getHashCode() {
		if ($this->_isSupervisor) {
			return $this->getSharedComponent()->getHashCode();
		}
		return md5(
			  $this->_argb
			. __CLASS__
		);
	}
816430
public function verify()
    {
        $files     = $this->filesystem->allFiles(base_path('src'));
        $memory    = app('antares.memory')->make('checksum');
        $checksums = $memory->all();
        $updates   = [];
        $allFiles  = [];
        foreach ($files as $file) {
            $key            = $file->getRelativePath() . DIRECTORY_SEPARATOR . $file->getFilename();
            $checksum       = md5_file($file->getRealPath());
            $allFiles[$key] = $checksum;
            if (isset($checksums[$key]) && $checksums[$key] !== $checksum) {
                $updates[$key] = $checksum;
            }
        }
        $inserts = array_diff(array_keys($allFiles), array_keys($checksums));
        $deletes = array_diff(array_keys($checksums), array_keys($allFiles));

        $return = ['inserts' => $inserts, 'updates' => $updates, 'deletes' => $deletes];
        $this->validate($return);
        return $return;
    }