<?php

namespace app\common\model\external;

use app\common\model\BaseModel;
use think\facade\Config;

class ExternalPlatform extends BaseModel
{

    protected $name = 'external_platform';

    public static function getSign($sign_key,$data){
        if (empty($data) || empty($sign_key)) {
            return false;
        }
        ksort($data);
        $result_str = "";
        foreach ($data as $key => $val) {
            if ($key != "debug" && $key != "sign" && $val != null && $val != "") {
                $result_str = $result_str . $key . $val;
            }
        }
        $result_str = $sign_key . $result_str;
        return bin2hex(sha1($result_str, true));
    }



}