src/Common/Weixin/Data/WxBaseData.php
protected function makeSign($signStr)
    {
        switch ($this->signType) {
            case 'MD5':
                $signStr .= '&key=' . $this->md5Key;
                $sign = md5($signStr);
                break;
            case 'HMAC-SHA256':
                $sign = base64_encode(hash_hmac('sha256', $signStr, $this->md5Key));
                break;
            default:
                $sign = '';
        }
        return strtoupper($sign);
    }
protected function makeSign($signStr)
    {
        switch ($this->signType) {
            case 'MD5':
                $signStr .= '&key=' . $this->md5Key;
                $sign = md5($signStr);
                break;
            case 'HMAC-SHA256':
                $sign = base64_encode(hash_hmac('sha256', $signStr, $this->md5Key));
                break;
            default:
                $sign = '';
        }
        return strtoupper($sign);
    }
protected function makeSign ( $ signStr ) { switch ( $ this -> signType ) { case 'MD5' : $ signStr .= '&key=' . $ this -> md5Key ; $ sign = md5 ( $ signStr ) ; break ; case 'HMAC-SHA256' : $ sign = base64_encode ( hash_hmac ( 'sha256' , $ signStr , $ this -> md5Key ) ) ; break ; default : $ sign = '' ; } return strtoupper ( $ sign ) ; }
签名算法实现  便于后期扩展微信不同的加密方式
@param string $signStr
@return string
签名算法实现 便于后期扩展微信不同的加密方式