getHmacString

Creates source string for hmac hash
THIS FUNCTION SHOULD NOT BE MODIFIED.

@access        private
@return        string
183118
public function getHmacString()
    {
        $retval = "";
        $retval .= $this->expandString($this->merchant);
        $retval .= $this->expandString($this->orderRef);
        $retval .= $this->expandString($this->orderDate);
        $retval .= $this->expandArray($this->orderPName);
        $retval .= $this->expandArray($this->orderPCode);
        if (is_array($this->orderPInfo) && !empty($this->orderPInfo)) {
            $retval .= $this->expandArray($this->orderPInfo);
        }
        $retval .= $this->expandArray($this->orderPrice);
        $retval .= $this->expandArray($this->orderQty);
        $retval .= $this->expandArray($this->orderVAT);
        if (is_array($this->orderVer) && !empty($this->orderVer)) {
            $retval .= $this->expandArray($this->orderVer);
        }

        //if(!empty($this->orderShipping))
        if (is_numeric($this->orderShipping) && $this->orderShipping >= 0) {
            $retval .= $this->expandString($this->orderShipping);
        }

        if (is_string($this->pricesCurrency) && !empty($this->pricesCurrency)) {
            $retval .= $this->expandString($this->pricesCurrency);
        }
        if (is_numeric($this->discount) && !empty($this->discount)) {
            $retval .= $this->expandString($this->discount);
        }
        if (is_string($this->destinationCity) && !empty($this->destinationCity)) {
            $retval .= $this->expandString($this->destinationCity);
        }
        if (is_string($this->destinationState) && !empty($this->destinationState)) {
            $retval .= $this->expandString($this->destinationState);
        }
        if (is_string($this->destinationCountry) && !empty($this->destinationCountry)) {
            $retval .= $this->expandString($this->destinationCountry);
        }
        if (is_string($this->payMethod) && !empty($this->payMethod)) {
            $retval .= $this->expandString($this->payMethod);
        }
        if (is_array($this->orderPGroup) && count($this->orderPGroup)) {
            $retval .= $this->expandArray($this->orderPGroup);
        }
        if (is_array($this->orderPType) && count($this->orderPType)) {
            $retval .= $this->expandArray($this->orderPType);
        }

        return $retval;
    }
288547
public function getHashCode()
    {
        return md5(
            $this->formula1 .
            $this->formula2 .
            $this->type = PHPExcel_Cell_DataValidation::TYPE_NONE .
            $this->errorStyle = PHPExcel_Cell_DataValidation::STYLE_STOP .
            $this->operator .
            ($this->allowBlank ? 't' : 'f') .
            ($this->showDropDown ? 't' : 'f') .
            ($this->showInputMessage ? 't' : 'f') .
            ($this->showErrorMessage ? 't' : 'f') .
            $this->errorTitle .
            $this->error .
            $this->promptTitle .
            $this->prompt .
            __CLASS__
        );
    }
805355
public function getSignature(): string
	{
		$input = $this->getArgs();

		$items = [];
		foreach ($input as $key => $val) {
			$items[] = sprintf('%s=%s', $key, $val);
		}

		$items[] = 'password=' . $this->getMerchantConfig()->password;

		return self::hashFunction(implode('&', $items));
	}
612548
public static String hmac(String string) throws NoSuchAlgorithmException, InvalidKeyException {
        String code = "";
        KeyGenerator keyGenerator = KeyGenerator.getInstance("HmacMD5");
        SecretKey secretKey = keyGenerator.generateKey();
        SecretKey secretKey2 = new SecretKeySpec(secretKey.getEncoded(), "HmacMD5");
        Mac mac = Mac.getInstance(secretKey.getAlgorithm());
        mac.init(secretKey2);
        return code;
    }
1372748
public function hashCode()
    {
        if (null !== $this->getPrimaryKey()) {
            return crc32(serialize($this->getPrimaryKey()));
        }

        return crc32(serialize(clone $this));
    }
995461
public function getHash()
	{
		$names = array_keys($this->initializers);
		sort($names);
		
		return md5(implode('|', $names));
	}
915610
private function createHmac(
        string $iv,
        string $keySalt,
        string $cipher,
        string $value,
        string $authenticationKey
    ) : string {
        return \hash_hmac(self::$hmacAlgorithm, self::$version . $cipher . $iv . $keySalt . $value, $authenticationKey);
    }
1057599
public function getHash(): string
    {
        $init = $this->pos;
        \fseek($this->fp, 0, SEEK_SET);

        // Create a hash context:
        $h = \sodium_crypto_generichash_init(
            $this->hashKey,
            \SODIUM_CRYPTO_GENERICHASH_BYTES_MAX
        );
        for ($i = 0; $i < $this->stat['size']; $i += self::CHUNK) {
            if (($i + self::CHUNK) > $this->stat['size']) {
                $c = \fread($this->fp, ((int) $this->stat['size'] - $i));
            } else {
                $c = \fread($this->fp, self::CHUNK);
            }
            if (!\is_string($c)) {
                // @codeCoverageIgnoreStart
                throw new FileError('Could not read file');
                // @codeCoverageIgnoreEnd
            }
            \sodium_crypto_generichash_update($h, $c);
        }
        // Reset the file pointer's internal cursor to where it was:
        \fseek($this->fp, $init, SEEK_SET);
        return \sodium_crypto_generichash_final($h);
    }
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);
    }
1158950
public function getHashCode() {
		if ($this->_isSupervisor) {
			return $this->getSharedComponent()->getHashCode();
		}
    	return md5(
    		  $this->_locked
    		. $this->_hidden
    		. __CLASS__
    	);
    }
549151
public function getHeader() : string
    {
        $salt = $this->getEncodedSalt();
        $hmac = $this->getEncodedHMAC();

        if ($this->version === 2) {
            $data = \base64_encode(\json_encode([
                'access_token' => $this->token->accessToken,
                'date' => $this->date,
                'hmac' => $hmac,
                'salt' => $salt,
                'v' => 2
            ]));

            return "HMAC {$data}";
        }

        // The version 1 HMAC is returned by default
        return "HMAC {$this->token->accessToken},{$hmac},{$salt}";
    }
373532
function SHA1(source) { // @arg String - source string
                        // @ret SHA1HashHexString
//{@dev
    $valid($type(source, "String"), SHA1, "source");
//}@dev

    var sha1 = DataType["Array"]["toHexStringArray"](
                    SHA1_encode(
                        DataType["Uint8Array"]["fromString"](source) ) );

    return sha1.join("");
}
1140948
public function getHash ()
    {
        if ($this->contextHashData['version'] !== $this->version) {
            $this->contextHashData['version'] = $this->version;
            $this->contextHashData['hash'] = md5(json_encode($this->data));
        }
        
        return $this->contextHashData['hash'];
    }
611075
public function getHeaderString()
    {
        $string = '';
        foreach ($this->headers as $name => $values) {
            foreach ($values as $value) {
                $string .= $name . ': ' . $value . "\r\n";
            }
        }
        return $string;
    }
98955
public function getHash()
    {
        ksort($this->possibilities);

        foreach ($this->possibilities as &$possible_types) {
            sort($possible_types);
        }

        $possibility_string = json_encode($this->possibilities);
        if (!$possibility_string) {
            return (string)rand(0, 10000000);
        }

        return md5($possibility_string) .
            ($this->wedge || !$this->reconcilable ? spl_object_hash($this) : '');
    }
818800
private function getEncryptedHash()
    {
        $signature = '';
        switch ($this->hashAlgorithm) {
            case 'rsa-sha1':
                $algorithm = OPENSSL_ALGO_SHA1;
                break;
            case 'rsa-sha256':
                $algorithm = OPENSSL_ALGO_SHA256;
                break;
        }
        $pkeyId = openssl_get_privatekey($this->privateKey, $this->passphrase);
        if (!$pkeyId) {
            throw new Swift_SwiftException('Unable to load DKIM Private Key ['.openssl_error_string().']');
        }
        if (openssl_sign($this->headerCanonData, $signature, $pkeyId, $algorithm)) {
            return $signature;
        }
        throw new Swift_SwiftException('Unable to sign DKIM Hash ['.openssl_error_string().']');
    }
523875
public function getHashCode()
    {
        if ($this->isSupervisor) {
            return $this->getSharedComponent()->getHashcode();
        }
        return md5(
            $this->getLeft()->getHashCode() .
            $this->getRight()->getHashCode() .
            $this->getTop()->getHashCode() .
            $this->getBottom()->getHashCode() .
            $this->getDiagonal()->getHashCode() .
            $this->getDiagonalDirection() .
            __CLASS__
        );
    }