src/Common/Ali/Data/AliBaseData.php
protected function makeSign($signStr)
    {
        switch ($this->signType) {
            case 'RSA':
                $rsa = new RsaEncrypt($this->rsaPrivateKey);

                $sign = $rsa->encrypt($signStr);
                break;
            case 'RSA2':
                $rsa = new Rsa2Encrypt($this->rsaPrivateKey);

                $sign = $rsa->encrypt($signStr);
                break;
            default:
                $sign = '';
        }

        return $sign;
    }
protected function makeSign($signStr)
    {
        switch ($this->signType) {
            case 'RSA':
                $rsa = new RsaEncrypt($this->rsaPrivateKey);

                $sign = $rsa->encrypt($signStr);
                break;
            case 'RSA2':
                $rsa = new Rsa2Encrypt($this->rsaPrivateKey);

                $sign = $rsa->encrypt($signStr);
                break;
            default:
                $sign = '';
        }

        return $sign;
    }
protected function makeSign ( $ signStr ) { switch ( $ this -> signType ) { case 'RSA' : $ rsa = new RsaEncrypt ( $ this -> rsaPrivateKey ) ; $ sign = $ rsa -> encrypt ( $ signStr ) ; break ; case 'RSA2' : $ rsa = new Rsa2Encrypt ( $ this -> rsaPrivateKey ) ; $ sign = $ rsa -> encrypt ( $ signStr ) ; break ; default : $ sign = '' ; } return $ sign ; }
签名算法实现
@param string $signStr
@return string
@author helei
签名算法实现