<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class SignUtil { public static function check($fJLzJ, $iq6Gr, $KCKbJ) { goto yW7L3; OW03u: if ($fJLzJ == self::common($iq6Gr, $KCKbJ, 'rawurlencode')) { return true; } goto UqZkP; qM9_H: if ($fJLzJ == self::common($iq6Gr, $KCKbJ, 'urlencode')) { return true; } goto OW03u; yW7L3: if ($fJLzJ == self::common($iq6Gr, $KCKbJ)) { return true; } goto qM9_H; UqZkP: return false; goto YFpIu; YFpIu: } public static function common($iq6Gr, $KCKbJ, $KiPJS = 'trim', $pTyys = 'app_secret') { goto c7Bsy; njQSQ: $fJLzJ = md5($WZM7T); goto GTmVU; OU5Ey: foreach ($iq6Gr as $U9AsU => $ohYVl) { $WZM7T[] = $U9AsU . '=' . $KiPJS($ohYVl); } goto RvMnw; C3GJD: $WZM7T = join('&', $WZM7T); goto njQSQ; c7Bsy: ksort($iq6Gr, SORT_STRING); goto h0o0g; GTmVU: return $fJLzJ; goto puFA3; h0o0g: $WZM7T = array(); goto OU5Ey; RvMnw: $WZM7T[] = $pTyys . '=' . $KCKbJ; goto C3GJD; puFA3: } public static function checkWithoutSecret($fJLzJ, $iq6Gr, $DRhsw = null) { goto N8bgp; N8bgp: if ($fJLzJ == self::commonWithoutSecret($iq6Gr, $DRhsw)) { return true; } goto bj6zO; bj6zO: if ($fJLzJ == self::commonWithoutSecret($iq6Gr, $DRhsw, 'rawurlencode')) { return true; } goto W0MgS; W0MgS: return false; goto MCnyS; MCnyS: } public static function commonWithoutSecret($iq6Gr, $DRhsw = null, $KiPJS = 'urlencode') { goto OlalC; WBLWf: return $fJLzJ; goto gr7Ac; JQw8q: if ($DRhsw) { $WZM7T = $DRhsw . '&' . $WZM7T; } goto LVUFj; qvuhJ: $WZM7T = join('&', $WZM7T); goto JQw8q; OlalC: ksort($iq6Gr, SORT_STRING); goto R5sX6; LVUFj: $fJLzJ = md5($WZM7T); goto WBLWf; Gs609: foreach ($iq6Gr as $U9AsU => $ohYVl) { $WZM7T[] = $U9AsU . '=' . $KiPJS($ohYVl); } goto qvuhJ; R5sX6: $WZM7T = array(); goto Gs609; gr7Ac: } }