php代码错误警告:Digital_Signature :: CreateSign()的声明

时间:2017-12-01 04:33:50

标签: php rsa pear

 function CreateSign()
{
$rsa_obj = new Crypt_RSA(array('private_key' => $this->_privateKey));
$this->check_error($rsa_obj);
return $rsa_obj->createSign($this->_document);
}

此代码显示此错误

Warning: Declaration of Digital_Signature::CreateSign() should be compatible with Crypt_RSA::createSign($document, $private_key = NULL, $hash_func = NULL) in /var/www/html/shares/digital_signature.php on line 49

任何人都可以提供帮助

1 个答案:

答案 0 :(得分:0)

父类和子类中的两个函数都应具有相同的参数,其参数的默认值也相同