php实现RSA加密类实例(2)

<?php header('Content-Type:text/html;Charset=utf-8;'); include "rsa.php"; echo '<pre>'; $a = isset($_GET['a']) ? $_GET['a'] : '测试123'; ////////////////////////////////////// $pubfile = 'E:\ssl\cert\pwd.crt'; $prifile = 'E:\ssl\cert\pwd.pem'; $m = new RSA($pubfile, $prifile); $x = $m->sign($a); $y = $m->verify($a, $x); var_dump($x, $y); $x = $m->encrypt($a); $y = $m->decrypt($x); var_dump($x, $y);

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/a8781acde679b57c45c9f016c5622121.html