<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Core\Util; class SignUtil { public static function check($Pmdhe, $foKec, $ygC7P) { goto Te_CG; CPCVA: return false; goto uN2DG; K62un: if ($Pmdhe == self::common($foKec, $ygC7P, 'rawurlencode')) { return true; } goto CPCVA; Ddlvk: if ($Pmdhe == self::common($foKec, $ygC7P, 'urlencode')) { return true; } goto K62un; Te_CG: if ($Pmdhe == self::common($foKec, $ygC7P)) { return true; } goto Ddlvk; uN2DG: } public static function common($foKec, $ygC7P, $HYkE6 = 'trim', $mvPWe = 'app_secret') { goto GM1bm; tNLCs: $DXCyn[] = $mvPWe . '=' . $ygC7P; goto zUNSA; fcl6N: foreach ($foKec as $B34tD => $Xz28r) { $DXCyn[] = $B34tD . '=' . $HYkE6($Xz28r); } goto tNLCs; s2R4Y: return $Pmdhe; goto EL0o5; zUNSA: $DXCyn = join('&', $DXCyn); goto pIGkp; pIGkp: $Pmdhe = md5($DXCyn); goto s2R4Y; Tlwwt: $DXCyn = array(); goto fcl6N; GM1bm: ksort($foKec, SORT_STRING); goto Tlwwt; EL0o5: } public static function checkWithoutSecret($Pmdhe, $foKec, $Tx0ze = null) { goto T5sqz; bqoB6: return false; goto G1FbO; T5sqz: if ($Pmdhe == self::commonWithoutSecret($foKec, $Tx0ze)) { return true; } goto FWa3u; FWa3u: if ($Pmdhe == self::commonWithoutSecret($foKec, $Tx0ze, 'rawurlencode')) { return true; } goto bqoB6; G1FbO: } public static function commonWithoutSecret($foKec, $Tx0ze = null, $HYkE6 = 'urlencode') { goto kzhsN; I6kOr: $DXCyn = join('&', $DXCyn); goto iwJJy; mco2B: $DXCyn = array(); goto boonT; kzhsN: ksort($foKec, SORT_STRING); goto mco2B; mjYQ7: return $Pmdhe; goto hXGOD; iwJJy: if ($Tx0ze) { $DXCyn = $Tx0ze . '&' . $DXCyn; } goto z9AN6; boonT: foreach ($foKec as $B34tD => $Xz28r) { $DXCyn[] = $B34tD . '=' . $HYkE6($Xz28r); } goto I6kOr; z9AN6: $Pmdhe = md5($DXCyn); goto mjYQ7; hXGOD: } }