依赖于OpenSSL扩展:
/*加密解密*/ functionauthcode($string,$operation='E') { $ssl_public=file_get_contents(DATA_PATH."/conf/cert_public.key"); $ssl_private=file_get_contents(DATA_PATH."/conf/cert_private.pem"); $pi_key= openssl_pkey_get_private($ssl_private);//这个函数可用来判断私钥是否是可用的,可用返回资源...