Calculates a hash value representing the entity.
@return string
353372
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->name,
            $this->labels->calculateHash(),
            $this->descriptions->calculateHash(),
            $this->craftingCategories,
            $this->craftingSpeed,
            $this->numberOfItemSlots,
            $this->numberOfFluidInputSlots,
            $this->numberOfFluidOutputSlots,
            $this->numberOfModuleSlots,
            $this->energyUsage,
            $this->energyUsageUnit,
            $this->iconHash,
        ]);
    }
1183083
public function getSha512Hash()
    {
        $signatureKey = $this->getSignatureKey();
        $request = $this->httpRequest->request;

        $hashData = '^' . implode('^', [
            $request->get('x_trans_id'),
            $request->get('x_test_request'),
            $request->get('x_response_code'),
            $request->get('x_auth_code'),
            $request->get('x_cvv2_resp_code'),
            $request->get('x_cavv_response'),
            $request->get('x_avs_code'),
            $request->get('x_method'),
            $request->get('x_account_number'),
            $request->get('x_amount'),
            $request->get('x_company'),
            $request->get('x_first_name'),
            $request->get('x_last_name'),
            $request->get('x_address'),
            $request->get('x_city'),
            $request->get('x_state'),
            $request->get('x_zip'),
            $request->get('x_country'),
            $request->get('x_phone'),
            $request->get('x_fax'),
            $request->get('x_email'),
            $request->get('x_ship_to_company'),
            $request->get('x_ship_to_first_name'),
            $request->get('x_ship_to_last_name'),
            $request->get('x_ship_to_address'),
            $request->get('x_ship_to_city'),
            $request->get('x_ship_to_state'),
            $request->get('x_ship_to_zip'),
            $request->get('x_ship_to_country'),
            $request->get('x_invoice_num'),
        ]) . '^';
        $hash = hash_hmac('sha512', $hashData, hex2bin($signatureKey));

        return strtoupper($hash);
    }
896334
private function generateHash()
    {
        $ctx = hash_init('md5');

        // We don't need to read the file contents if the source has a path
        if ($this->source->path()) {
            hash_update_file($ctx, $this->source->path());
        } else {
            hash_update($ctx, $this->source->contents());
        }

        return hash_final($ctx);
    }
805056
public function getHash()
    {
        if ($this->hash === null) {
            $this->hash = sha1_file($this->getLocalPath());
        }

        return $this->hash;
    }
922090
public function hashCode()
    {
        $h = crc32(serialize($this->value)) ^ crc32($this->comparison);

        if ($this->table !== null) {
            $h ^= crc32($this->table);
        }

        if ($this->column !== null) {
            $h ^= crc32($this->column);
        }

        foreach ($this->clauses as $clause) {
            // TODO: I KNOW there is a php incompatibility with the following line
            // but I don't remember what it is, someone care to look it up and
            // replace it if it doesn't bother us?
            // $clause->appendPsTo($sb='',$params=array());
            $sb = '';
            $params = array();
            $clause->appendPsTo($sb, $params);
            $h ^= crc32(serialize(array($sb, $params)));
            unset ($sb, $params);
        }

        return $h;
    }
1114260
protected function calculateRoot(): string
    {
        $size = \count($this->nodes);
        if ($size < 1) {
            return '';
        }
        $order = self::getSizeRoundedUp($size);
        /** @var array<int, string> $hash */
        $hash = [];
        // Population (Use self::MERKLE_LEAF as a prefix)
        for ($i = 0; $i < $order; ++$i) {
            if ($i >= $size) {
                $hash[$i] = self::MERKLE_LEAF .
                    $this->personalization .
                    $this->nodes[$size - 1]->getHash(
                        true,
                        $this->outputSize,
                        $this->personalization
                    );
            } else {
                $hash[$i] = self::MERKLE_LEAF .
                    $this->personalization .
                    $this->nodes[$i]->getHash(
                        true,
                        $this->outputSize,
                        $this->personalization
                    );
            }
        }

        // Calculation (Use self::MERKLE_BRANCH as a prefix)
        do {
            /** @var array<int, string> $tmp */
            $tmp = [];
            $j = 0;
            for ($i = 0; $i < $order; $i += 2) {
                /** @var string $prev */
                $curr = (string) ($hash[$i] ?? '');
                if (empty($hash[$i + 1])) {
                    // @codeCoverageIgnoreStart
                    $tmp[$j] = Util::raw_hash(
                        self::MERKLE_BRANCH .
                            $this->personalization .
                            $curr .
                            $curr,
                        $this->outputSize
                    );
                    // @codeCoverageIgnoreEnd
                } else {
                    /** @var string $curr */
                    $curr = (string) ($hash[$i] ?? '');
                    /** @var string $next */
                    $next = (string) ($hash[$i + 1] ?? '');
                    $tmp[$j] = Util::raw_hash(
                        self::MERKLE_BRANCH .
                            $this->personalization .
                            $curr . $next,
                        $this->outputSize
                    );
                }
                ++$j;
            }
            $hash = $tmp;
            $order >>= 1;
        } while ($order > 1);
        // We should only have one value left:t
        $this->rootCalculated = true;
        /** @var string $first */
        $first = \array_shift($hash);
        return $first;
    }
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,
        ]);
    }
342366
public function calculateHash()
    {
        $str =  $this->data['ECM_TRANS_ID'] .
                $this->data['ECM_TRANS_DATE'] .
                $this->request->getPurse() .
                $this->data['ECM_PAYER_ID'] .
                $this->data['ECM_ITEM_COST'] .
                $this->data['ECM_QTY'] .
                $this->request->getSecret();

        return md5($str);
    }
1370612
public function getHashCode() {
    	return md5(
    		  $this->_path
    		. $this->_name
    		. $this->_offsetX
    		. $this->_offsetY
    		. $this->_width
    		. $this->_height
    		. __CLASS__
    	);
    }
342675
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->type,
            $this->name,
            $this->amountMin,
            $this->amountMax,
            $this->probability,
            $this->order,
        ]);
    }
1364967
public function getHash(): ?string
    {
        if (!$this->_hash) {
            $this->_hash = $this->generateHash();
        }

        return $this->_hash;
    }
571261
public function getHash()
    {
        $hash = [];
        foreach ($this->metadata->getAttributes() as $key => $attrMeta) {
            $value = $this->get($key);
            if (null === $value) {
                $hash[$key] = $value;
                continue;
            }
            switch ($attrMeta->dataType) {
                case 'date':
                    $value = $value->getTimestamp();
                    break;
                case 'object':
                    $value = (array) $value;
                    ksort($value);
                    break;
                case 'mixed':
                    $value = serialize($value);
                    break;
                case 'array':
                    sort($value);
                    break;
            }
            $hash[$key] = $value;
        }
        foreach ($this->metadata->getEmbeds() as $key => $embbedPropMeta) {
            if (true === $embbedPropMeta->isOne()) {
                $embed = $this->get($key);
                $hash[$key] = (null === $embed) ? null : $embed->getHash();
            } else {
                $collection = $this->get($key);
                $hash[$key] = $collection->getHash();
            }
        }
        ksort($hash);
        return md5(serialize($hash));
    }
428719
public function getHash()
    {
        if (null === $this->hash) {
            $this->hash = $this->calculateHash();
        }

        return $this->hash;
    }
818852
public function getHashCode()
    {
        if ($this->isSupervisor) {
            return $this->getSharedComponent()->getHashCode();
        }
        return md5(
            $this->horizontal .
            $this->vertical .
            $this->textRotation .
            ($this->wrapText ? 't' : 'f') .
            ($this->shrinkToFit ? 't' : 'f') .
            $this->indent .
            $this->readorder .
            __CLASS__
        );
    }
1074859
protected function getParameterHash()
    {
        $parts = array(
            $this->repo->getName(),
            serialize((array) $this->limit),
            serialize((array) $this->orderBy),
            serialize((array) $this->predicate),
        );

        return md5(implode('|', $parts));
    }
805539
public function getHashCode()
    {
        if ($this->dirty) {
            $this->hash = md5($this->title . $this->autoFilter . ($this->protection->isProtectionEnabled() ? 't' : 'f') . __CLASS__);
            $this->dirty = false;
        }
        return $this->hash;
    }
411929
public function getHashCode()
    {
        $hashConditionals = '';
        foreach ($this->_conditionalStyles as $conditional) {
            $hashConditionals .= $conditional->getHashCode();
        }

        return md5(
              $this->_fill->getHashCode()
            . $this->_font->getHashCode()
            . $this->_borders->getHashCode()
            . $this->_alignment->getHashCode()
            . $this->_numberFormat->getHashCode()
            . $hashConditionals
            . $this->_protection->getHashCode()
            . ($this->_quotePrefix  ? 't' : 'f')
            . __CLASS__
        );
    }