java - 求MD5withRSA算法的PHP实现?

WBOY
Release: 2016-06-06 20:24:33
Original
1751 people have browsed it

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

回复内容:

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

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

<code class="php">$rsa = new Crypt_RSA();
$rsa->setHash('md5');</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!