$v) { $text .= $k . $v; } return self::hash($method, $appSecret . $text . $appSecret); } private static function hash($method, $text) { switch ($method) { case 'md5': default: $signature = md5($text); break; } return $signature; } public static function allowed_sign_methods() { return array('md5'); } public static function allowed_format() { return array('json'); } }