I\'m trying to implement digital signature in php as in java sample code below:
Signature rsaSig = Signature.getInstance(\"MD5withRSA\");
By default phpseclib uses sha1 as the hash. You probably need to do $rsa->setHash('md5').
$rsa->setHash('md5')