Home  >  Article  >  Backend Development  >  java - 求MD5withRSA算法的PHP实现?

java - 求MD5withRSA算法的PHP实现?

WBOY
WBOYOriginal
2016-06-06 20:24:331631browse

最近用php做api开发demo的时候,合作方采用的是java的MD5withRSA加签,现求MD5withRSA加签算法的PHP实现,网上好像都只有验签操作...谢谢。

回复内容:

最近用php做api开发demo的时候,合作方采用的是java的MD5withRSA加签,现求MD5withRSA加签算法的PHP实现,网上好像都只有验签操作...谢谢。

phpseclib Hash 默认使用 sha1,你可以通过 setHash 方法手动设置为 MD5:

$rsa = new Crypt_RSA();
$rsa->setHash('md5');
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn