MD5 with RSA in php
问题 I'm trying to implement digital signature in php as in java sample code below: Signature rsaSig = Signature.getInstance("MD5withRSA"); RSAPrivateKey clientPrivateKey = readPrivateKeyFromFile(fileName); rsaSig.initSign(clientPrivateKey); String source = msg; byte temp[] = source.getBytes(); rsaSig.update(temp); byte sig[] = rsaSig.sign(); BASE64Encoder encoder = new BASE64Encoder(); return encoder.encode(sig); My php code : $rsa = new Crypt_RSA(); $rsa->loadKey('...'); // in xml format