<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class SignUtil { public static function check($IMKwh, $UbqnB, $kzh1N) { goto FgTpu; H5Idr: if ($IMKwh == self::common($UbqnB, $kzh1N, 'rawurlencode')) { return true; } goto NSUB2; NSUB2: return false; goto TjJFz; Z_GB0: if ($IMKwh == self::common($UbqnB, $kzh1N, 'urlencode')) { return true; } goto H5Idr; FgTpu: if ($IMKwh == self::common($UbqnB, $kzh1N)) { return true; } goto Z_GB0; TjJFz: } public static function common($UbqnB, $kzh1N, $vfIKO = 'trim', $MIgVE = 'app_secret') { goto ZRi9u; XebQV: $QaAPh = array(); goto Dtxeq; EPgFv: $IMKwh = md5($QaAPh); goto Obt3n; Dtxeq: foreach ($UbqnB as $pztz4 => $Q0rz2) { $QaAPh[] = $pztz4 . '=' . $vfIKO($Q0rz2); } goto xCKxM; Obt3n: return $IMKwh; goto rJWss; xCKxM: $QaAPh[] = $MIgVE . '=' . $kzh1N; goto IvXBd; IvXBd: $QaAPh = join('&', $QaAPh); goto EPgFv; ZRi9u: ksort($UbqnB, SORT_STRING); goto XebQV; rJWss: } public static function checkWithoutSecret($IMKwh, $UbqnB, $BSuqj = null) { goto WA62T; oJ1ry: if ($IMKwh == self::commonWithoutSecret($UbqnB, $BSuqj, 'rawurlencode')) { return true; } goto TnpKD; TnpKD: return false; goto n0GCq; WA62T: if ($IMKwh == self::commonWithoutSecret($UbqnB, $BSuqj)) { return true; } goto oJ1ry; n0GCq: } public static function commonWithoutSecret($UbqnB, $BSuqj = null, $vfIKO = 'urlencode') { goto nrzqy; PfudT: if ($BSuqj) { $QaAPh = $BSuqj . '&' . $QaAPh; } goto Sk0eJ; ugyC8: $QaAPh = array(); goto n3R4Z; wD_VF: $QaAPh = join('&', $QaAPh); goto PfudT; B5x5A: return $IMKwh; goto hZfGq; nrzqy: ksort($UbqnB, SORT_STRING); goto ugyC8; Sk0eJ: $IMKwh = md5($QaAPh); goto B5x5A; n3R4Z: foreach ($UbqnB as $pztz4 => $Q0rz2) { $QaAPh[] = $pztz4 . '=' . $vfIKO($Q0rz2); } goto wD_VF; hZfGq: } }