calculate request hash.

@param array $aInput

@return string
332305
protected function GetMontradaRequstHash($aInput)
    {
        $sDelimiter = '-';

        $sString = $this->GetConfigParameter('secret').$sDelimiter;
        $sString .= $this->GetConfigParameter('merchid').$sDelimiter;
        $sString .= $aInput['orderid'].$sDelimiter;
        $sString .= $this->GetConfigParameter('payments').$sDelimiter;
        $sString .= $aInput['amount'].$sDelimiter;
        $sString .= $aInput['currency'].$sDelimiter;
        $sString .= $aInput['command'].$sDelimiter;
        $sString .= $aInput['timestamp'];

        return hash('sha256', $sString);
    }
1213187
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->red,
            $this->green,
            $this->blue,
            $this->alpha,
        ]);
    }
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);
    }
914994
public static function hash($input)
    {
        if (Symphony::Log()) {
            Symphony::Log()->pushDeprecateWarningToLog('SHA1::hash()', 'PBKDF2::hash()', array(
                'message-format' => __('The use of `%s` is strongly discouraged due to severe security flaws.'),
            ));
        }
        return sha1($input);
    }
469944
public function encrypt($input)
    {
        if (! $input) {
            return $input;
        }

        $methods = $this->getEncryptionMethods();
        $method  = reset($methods);
        $mkey    = key($methods);

        if ('mcrypt' == $method) {
            $result = $this->encryptMcrypt($input);
        } elseif ('null' == $method) {
            $result = $input;
        } else {
            $result = $this->encryptOpenSsl($input, $method);
        }

        return ":$mkey:" . base64_encode($result);
    }
414222
protected function _aarrayToMultiline($aInput)
    {
        if (is_array($aInput)) {
            $sMultiline = '';
            foreach ($aInput as $sKey => $sVal) {
                if ($sMultiline) {
                    $sMultiline .= "\n";
                }
                $sMultiline .= $sKey . " => " . $sVal;
            }

            return $sMultiline;
        }
    }
1106864
public function calculateSig($appkey, $random, $curTime, $phoneNumbers)
    {
        $phoneNumbersString = $phoneNumbers[0];
        for ($i = 1; $i < count($phoneNumbers); $i++) {
            $phoneNumbersString .= ("," . $phoneNumbers[$i]);
        }

        return hash("sha256", "appkey=".$appkey."&random=".$random
            ."&time=".$curTime."&mobile=".$phoneNumbersString);
    }
1356881
public function request($inputs)
    {
        $result = $this->restCall('PaymentRequest.json', $inputs);

        if ($result['Status'] == 100 || $result['Status'] == 101) {
            return ['Authority' => $result['Authority']];
        } else {
            return ['error' => $result['Status']];
        }
    }
1301220
private function _make_hash(): string
  {
    $args = \func_get_args();
    if ( (\count($args) === 1) && \is_array($args[0]) ){
      $args = $args[0];
    }
    $st = '';
    foreach ( $args as $a ){
      $st .= \is_array($a) ? serialize($a) : '--'.$a.'--';
    }
    return $this->hash_contour.md5($st).$this->hash_contour;
  }
205309
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->size,
            $this->renderedSize,
            array_map(function (Layer $layer): string {
                return $layer->calculateHash();
            }, $this->layers)
        ]);
    }
1210194
protected function outputsToHash($outputs)
    {
        return array_map(function ($output) {

            // If a destination_root was set, subsitute that in for the destination
            // in the retured URL
            if ($root = Config::get('decoy.encode.destination_root')) {
                return str_replace(Config::get('decoy.encode.destination'), $root, $output->url);
            }

            // Else just return the URL
            return $output->url;
        }, $this->zencoderArray($outputs));
    }
716323
public function verifySalt($input)
    {
        $regex = '/^\$sha1\$(\d{1,10})\$([\.\/0-9A-Za-z]{0,64})\$?$/';
        $matches = array ();

        $appearsValid = (1 === preg_match($regex, $input, $matches));
        if ($appearsValid) {
            $rounds = (int) $matches[1];
            $salt = $matches[2];

            if (!empty ($matches[1]) && ($rounds < 1 || $rounds > 4294967295)) {
                $appearsValid = false;
            }
        }

        return $appearsValid;
    }
748674
public function calculateHash()
    {
        $fullArray = $this->toArray();
        $configurationArray = [
            'view'     => $fullArray['view'],
            'settings' => $fullArray['settings']
        ];

        $this->hash = HashService::get()->getHash(serialize($configurationArray));
    }
230131
public function calculateHash(): string
    {
        return EntityUtils::calculateHashOfArray([
            $this->type,
            $this->name,
            $this->amount,
            $this->order,
        ]);
    }
840057
public function assignValuesToText($aIn)
    {
        $sRet = "";
        reset($aIn);
        foreach ($aIn as $sKey => $sVal) {
            $sRet .= $sKey;
            $sRet .= "__";
            $sRet .= $sVal;
            $sRet .= "@@";
        }

        return $sRet;
    }
1202344
public static function hash(
        string $input,
        int $length = \SODIUM_CRYPTO_GENERICHASH_BYTES
    ): string {
        return Hex::encode(
            self::raw_keyed_hash($input, '', $length)
        );
    }
1290801
public static function parseXmlI18n($aInput, $aLang)
    {
        $aSearch = array();
        $aReplace = array();
        
        if (is_array($aLang) && count($aLang)) {        
            foreach ($aLang as $k => $val) {
                $aSearch[] = '{$'.$k.'}';
                $aReplace[] = $val;
            }

            foreach ($aInput as $k => $val) {
                if (!is_array($val)) {
                    $aInput[$k] = str_replace($aSearch, $aReplace, $val);
                } else {
                    $aInput[$k] = Core::parseXmlI18n($aInput[$k], $aLang);
                }
            }
        }

        return $aInput;
    }