Calculate hash to validate incoming confirmation.

@return string
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);
    }
112334
public function confirmReceived()
    {
        $this->debugMessage[] = 'IPN CONFIRM: START';
        if (!$this->ipnPostDataCheck()) {
            $this->debugMessage[] = 'IPN CONFIRM: END';
            return false;
        }

        $serverDate = @date("YmdHis");
        $hashArray = array(
            $this->postData['IPN_PID'][0],
            $this->postData['IPN_PNAME'][0],
            $this->postData['IPN_DATE'],
            $serverDate
        );
        $hash = $this->createHashString($hashArray);
        $string = "<EPAYMENT>" . $serverDate . "|" . $hash . "</EPAYMENT>";
        $this->debugMessage[] = 'IPN CONFIRM EPAYMENT: ' . $string;
        $this->debugMessage[] = 'IPN CONFIRM: END';
        if ($this->echo) {
            echo $string;
        }
        return $string;
    }
463809
public function calculateHash()
    {
        $answerModel = $this->getAnswerModel('en');
        foreach($answerModel->getItemsOrdered() as $item) {
                $result = $answerModel->get($item, ['label', 'type', 'multiOptions', 'parent_question', 'thClass', 'group', 'description']);
                if (array_key_exists('label', $result)) {
                    $items[$item] = $result;
                }
        }

        $hash = md5(serialize($items));
        
        return $hash;
    }
302740
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->name,
            $this->mainModName,
            $this->loadedModNames,
            $this->loadedOptionalModNames,
        ]);
    }
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;
    }
1048304
protected function calculateChecksum() {
        // Calculating Checksum
        // Consider the right-most digit of the message to be in an "even" position,
        // and assign odd/even to each character moving from right to left
        // Even Position = 3, Odd Position = 1
        // Multiply it by the number
        // Add all of that and do 10-(?mod10)
        $even = true;
        $this->checksumValue = 0;
        $c = strlen($this->text);
        for ($i = $c; $i > 0; $i--) {
            if ($even === true) {
                $multiplier = 3;
                $even = false;
            } else {
                $multiplier = 1;
                $even = true;
            }

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

        $this->checksumValue = (10 - $this->checksumValue % 10) % 10;
    }
1097334
public function confirmed()
    {
        if (in_array($this->default, ["y", "yes"], true)) {
            $this->prompt .= " [Y/n]";
        } else {
            $this->prompt .= " [y/N]";
        }

        $this->accept(['y', 'yes', 'n', 'no'], false);

        $response = strtolower($this->prompt());

        return (substr($response, 0, 1) === 'y');
    }
1158762
public function getHash()
    {
        return md5(
            implode('', $this->scripts)
            . implode('', $this->files)
            . $this->mode
            . $this->warningLevel
            . $this->getFormattingOptions()->getPrettyPrintEnabled()
            . $this->getFormattingOptions()->getPrintInputDelimiterEnabled()
        );
    }
831746
public function getChecksum() : string
    {
        if (empty($this->checksum)) {
            $this->setChecksum(hash_file($this->getChecksumAlgorithm(), $this->getFilePath()));
        }

        return $this->checksum;
    }
1004283
protected function generateCheckSumDynamic() {
        return sha1(
                        sprintf("%s|%s|%s|%s|%s|%s|%s|%s|%s", $this->_merchantID, $this->_secretCode, $this->data->ic_amount, $this->data->ic_orderid, $this->data->ic_reference, $this->data->ic_currency, $this->data->ic_country, $this->data->ic_urlcompleted, $this->data->ic_urlerror
                        )
        );
    }
1302727
public function getReadHash(): string
    {
        $hash = hash_final($this->read_hash, true);
        if ($this->rev) {
            $hash = strrev($hash);
        }
        $this->read_hash = null;
        $this->read_check_after = 0;
        $this->read_check_pos = 0;

        return $hash;
    }
1008673
public function getHash()
	{
		$h = hash_init($this->_hashAlgo);
		foreach($this->_keys as &$v)
			hash_update($h, $v);
		$r = hash_final($h, true);
		unset($h);
		return $r;
	}
948700
public function getHash()
	{
		if ($this->hash == null) {
			$this->requestBody();
			$this->hash = sha1_file($this->bodyTempFile);
		}
		return $this->hash;
	}
723125
public function isValid()
    {
        $hashedBody = strtoupper(hash_hmac('sha512', $this->webhookJson, $this->signature));
        return (isset($this->headers['X-ANET-SIGNATURE']) && strtoupper(explode('=', $this->headers['X-ANET-SIGNATURE'])[1]) === $hashedBody);
    }
1207477
function confirmation() {
    $confirmation = array('title' => $this->title . ': ' . $this->cc_card_type,
                          'fields' => array(array('title' => MODULE_PAYMENT_LINKPOINT_API_TEXT_CREDIT_CARD_OWNER,
                                                  'field' => $_POST['linkpoint_api_cc_owner']),
                                            array('title' => MODULE_PAYMENT_LINKPOINT_API_TEXT_CREDIT_CARD_NUMBER,
                                                  'field' => str_repeat('X', (strlen($this->cc_card_number) - 4)) . substr($this->cc_card_number, -4)),
                                            array('title' => MODULE_PAYMENT_LINKPOINT_API_TEXT_CREDIT_CARD_EXPIRES,
                                                  'field' => strftime('%B, %Y', mktime(0,0,0,$_POST['linkpoint_api_cc_expires_month'], 1, '20' . $_POST['linkpoint_api_cc_expires_year'])))));

    return $confirmation;
  }
753817
function confirmation() {
    global $order;
    $confirmation = array('fields' => array(array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_NAME,
                                                  'field' => $_POST['authorizenet_echeck_bank_name']),
                                            array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_ROUTING_CODE,
                                                  'field' => $_POST['authorizenet_echeck_bank_aba_code']),
                                            array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_ACCOUNT_TYPE,
                                                  'field' => $_POST['authorizenet_echeck_bank_acct_type']),
                                            array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_BANK_ACCOUNT_NUM,
                                                  'field' => $_POST['authorizenet_echeck_bank_acct_num']),
                                            array('title' => MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_AUTHORIZATION_TITLE,
                                                  'field' => sprintf(MODULE_PAYMENT_AUTHORIZENET_ECHECK_TEXT_AUTHORIZATION_NOTICE, strtolower(zen_db_prepare_input($_POST['authorizenet_echeck_bank_acct_type'])), zen_date_short(date("Y-m-d")), $order->info['total']))
                                            ));
    return $confirmation;
  }
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);
    }