<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class SignUtil { public static function check($w4EDX, $zIOpr, $zr8da) { goto KqI1q; nprqf: return false; goto bed9O; Q5S5w: if ($w4EDX == self::common($zIOpr, $zr8da, 'rawurlencode')) { return true; } goto nprqf; D4XEE: if ($w4EDX == self::common($zIOpr, $zr8da, 'urlencode')) { return true; } goto Q5S5w; KqI1q: if ($w4EDX == self::common($zIOpr, $zr8da)) { return true; } goto D4XEE; bed9O: } public static function common($zIOpr, $zr8da, $LbU5j = 'trim', $yGQlA = 'app_secret') { goto tuaTX; tuaTX: ksort($zIOpr, SORT_STRING); goto oDsH5; jwiHf: foreach ($zIOpr as $RTHJ6 => $F6Fus) { $k5bLx[] = $RTHJ6 . '=' . $LbU5j($F6Fus); } goto Y0pTo; Y0pTo: $k5bLx[] = $yGQlA . '=' . $zr8da; goto unE13; oDsH5: $k5bLx = array(); goto jwiHf; unE13: $k5bLx = join('&', $k5bLx); goto liXas; QgL51: return $w4EDX; goto yTTMN; liXas: $w4EDX = md5($k5bLx); goto QgL51; yTTMN: } public static function checkWithoutSecret($w4EDX, $zIOpr, $HTQyg = null) { goto yvlnp; ObOdT: if ($w4EDX == self::commonWithoutSecret($zIOpr, $HTQyg, 'rawurlencode')) { return true; } goto B2fmT; yvlnp: if ($w4EDX == self::commonWithoutSecret($zIOpr, $HTQyg)) { return true; } goto ObOdT; B2fmT: return false; goto yDP0O; yDP0O: } public static function commonWithoutSecret($zIOpr, $HTQyg = null, $LbU5j = 'urlencode') { goto QDBLY; Jyb42: if ($HTQyg) { $k5bLx = $HTQyg . '&' . $k5bLx; } goto x7JdY; l16nt: $k5bLx = array(); goto x1V2h; QDBLY: ksort($zIOpr, SORT_STRING); goto l16nt; L24tG: $k5bLx = join('&', $k5bLx); goto Jyb42; mun1H: return $w4EDX; goto IU_VQ; x7JdY: $w4EDX = md5($k5bLx); goto mun1H; x1V2h: foreach ($zIOpr as $RTHJ6 => $F6Fus) { $k5bLx[] = $RTHJ6 . '=' . $LbU5j($F6Fus); } goto L24tG; IU_VQ: } }