<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class SignUtil { public static function check($IPTJ8, $sgeM_, $C15Es) { goto Z8QxQ; Vilwy: if ($IPTJ8 == self::common($sgeM_, $C15Es, 'urlencode')) { return true; } goto HFCu0; Y92Dx: return false; goto kqrPU; HFCu0: if ($IPTJ8 == self::common($sgeM_, $C15Es, 'rawurlencode')) { return true; } goto Y92Dx; Z8QxQ: if ($IPTJ8 == self::common($sgeM_, $C15Es)) { return true; } goto Vilwy; kqrPU: } public static function common($sgeM_, $C15Es, $yiaex = 'trim', $jgrcA = 'app_secret') { goto W0aCw; LtARc: $AWlMZ = join('&', $AWlMZ); goto qyjW2; RPlab: $AWlMZ[] = $jgrcA . '=' . $C15Es; goto LtARc; qyjW2: $IPTJ8 = md5($AWlMZ); goto c3reX; yVL3J: $AWlMZ = array(); goto FY255; c3reX: return $IPTJ8; goto YLKE9; W0aCw: ksort($sgeM_, SORT_STRING); goto yVL3J; FY255: foreach ($sgeM_ as $lxIPA => $knQyJ) { $AWlMZ[] = $lxIPA . '=' . $yiaex($knQyJ); } goto RPlab; YLKE9: } public static function checkWithoutSecret($IPTJ8, $sgeM_, $hyTx0 = null) { goto NEUmL; vfSuy: return false; goto Famgg; l2gWo: if ($IPTJ8 == self::commonWithoutSecret($sgeM_, $hyTx0, 'rawurlencode')) { return true; } goto vfSuy; NEUmL: if ($IPTJ8 == self::commonWithoutSecret($sgeM_, $hyTx0)) { return true; } goto l2gWo; Famgg: } public static function commonWithoutSecret($sgeM_, $hyTx0 = null, $yiaex = 'urlencode') { goto ysBOh; O81Tj: foreach ($sgeM_ as $lxIPA => $knQyJ) { $AWlMZ[] = $lxIPA . '=' . $yiaex($knQyJ); } goto DZ_Wl; QXBVm: if ($hyTx0) { $AWlMZ = $hyTx0 . '&' . $AWlMZ; } goto pzkFD; pzkFD: $IPTJ8 = md5($AWlMZ); goto Qiaiz; Nztgh: $AWlMZ = array(); goto O81Tj; Qiaiz: return $IPTJ8; goto fw0xe; DZ_Wl: $AWlMZ = join('&', $AWlMZ); goto QXBVm; ysBOh: ksort($sgeM_, SORT_STRING); goto Nztgh; fw0xe: } }