资源简介
经过本人修改,简化并完善了别人的代码,使其更加的容易理解和学习!
此为一个完整的项目,可以直接在NetBeans IDE里运行测试。
功能:服务端随机生成密钥,JS用公钥加密,服务端用私钥解密。用到的JS加密文件是从官网下载的最新版,速度快,稳定性好!
代码片段和文件信息
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.util.*;
public final class hello_jsp extends org.apache.jasper.runtime.HttpJspbase
implements org.apache.jasper.runtime.JspSourceDependent {
private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
private static java.util.List _jspx_dependants;
private org.glassfish.jsp.api.ResourceInjector _jspx_resourceInjector;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request HttpServletResponse response)
throws java.io.IOException ServletException {
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
response.setContentType(“text/html;charset=utf-8“);
pageContext = _jspxFactory.getPageContext(this request response
null true 8192 true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
_jspx_resourceInjector = (org.glassfish.jsp.api.ResourceInjector) application.getAttribute(“com.sun.appserv.jsp.resource.injector“);
out.write(‘\r‘);
out.write(‘\n‘);
String path = request.getContextPath();
String basePath = request.getScheme() + “://“
+ request.getServerName() + “:“ + request.getServerPort()
+ path + “/“;
out.write(“\r\n“);
out.write(“\r\n“);
out.write(“\r\n“);
out.write(“\r\n“);
out.write(“ \r\n“);
out.write(“ se href=\““);
out.print(basePath);
out.write(“\“>\r\n“);
out.write(“\r\n“);
out.write(“ tle>Java解密javascript加密 tle>\r\n“);
out.write(“ ta http-equiv=\“pragma\“ content=\“no-cache\“>\r\n“);
out.write(“ ta http-equiv=\“cache-control\“ content=\“no-cache\“>\r\n“);
out.write(“ ta http-equiv=\“expires\“ content=\“0\“>\r\n“);
out.write(“ ta http-equiv=\“keywords\“ content=\“keyword1keyword2keyword3\“>\r\n“);
out.write(“ ta http-equiv=\“description\“ content=\“This is my page\“>\r\n“);
out.write(“ \r\n“);
out.write(“\r\n“);
out.write(“ \r\n“);
out.write(“ 点击进入\r\n“);
out.write(“ \r\n“);
out.write(“\r\n“);
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_ou
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4725 2015-12-11 12:00 javaDecodeJs\build\generated\classes\org\apache\jsp\hello_jsp.class
文件 6335 2015-12-12 12:01 javaDecodeJs\build\generated\classes\org\apache\jsp\index_jsp.class
文件 102 2015-12-11 12:00 javaDecodeJs\build\generated\src\org\apache\jsp\hello_jsp.class.smap
文件 3334 2015-12-11 12:00 javaDecodeJs\build\generated\src\org\apache\jsp\hello_jsp.java
文件 119 2015-12-12 12:01 javaDecodeJs\build\generated\src\org\apache\jsp\index_jsp.class.smap
文件 5264 2015-12-12 12:01 javaDecodeJs\build\generated\src\org\apache\jsp\index_jsp.java
文件 0 2015-12-12 18:38 javaDecodeJs\build\web\gfv3ee6.dpf
文件 855 2015-12-11 11:59 javaDecodeJs\build\web\hello.jsp
文件 2019 2015-12-11 18:41 javaDecodeJs\build\web\index.jsp
文件 1812 2015-12-12 11:27 javaDecodeJs\build\web\js\Barrett.js
文件 15733 2015-12-11 08:49 javaDecodeJs\build\web\js\BigInt.js
文件 2468 2015-12-11 08:49 javaDecodeJs\build\web\js\RSA.js
文件 25 2015-12-11 08:49 javaDecodeJs\build\web\me
文件 1462 2015-12-11 12:34 javaDecodeJs\build\web\success.jsp
文件 0 2015-12-11 08:49 javaDecodeJs\build\web\WEB-INF\classes\.netbeans_automatic_build
文件 0 2015-12-11 08:49 javaDecodeJs\build\web\WEB-INF\classes\.netbeans_update_resources
文件 2290 2015-12-12 18:38 javaDecodeJs\build\web\WEB-INF\classes\decode\js\servlet\IndexServlet.class
文件 2857 2015-12-12 18:38 javaDecodeJs\build\web\WEB-INF\classes\decode\js\servlet\JavaDecodeJsServlet.class
文件 7316 2015-12-12 16:22 javaDecodeJs\build\web\WEB-INF\classes\decode\js\util\Escape.class
文件 1233 2015-12-12 16:22 javaDecodeJs\build\web\WEB-INF\classes\decode\js\util\HexToBytes.class
文件 2192 2015-12-12 18:26 javaDecodeJs\build\web\WEB-INF\classes\decode\js\util\RSAUtil.class
文件 2070477 2015-12-12 13:51 javaDecodeJs\build\web\WEB-INF\lib\bcprov-ext.jar
文件 479 2015-12-11 08:49 javaDecodeJs\build\web\WEB-INF\sun-web.xm
文件 1005 2015-12-11 11:59 javaDecodeJs\build\web\WEB-INF\web.xm
文件 3505 2015-12-12 13:51 javaDecodeJs\build.xm
文件 6784 2015-12-11 08:28 javaDecodeJs\nbproject\ant-deploy.xm
文件 81567 2015-12-12 13:51 javaDecodeJs\nbproject\build-impl.xm
文件 473 2015-12-12 13:51 javaDecodeJs\nbproject\genfiles.properties
文件 721 2015-12-11 08:46 javaDecodeJs\nbproject\private\private.properties
文件 343 2015-12-12 18:39 javaDecodeJs\nbproject\private\private.xm
............此处省略58个文件信息
相关资源
- RSA加密解密JS加密JAVA解密
- javaweb使用rsa加密解密jar包
- android加密
- local_policy.jar和US_export_policy.jar java解密
- RSA加密解密java
- php与java互通rsa加密解密
- Java实现RSA加密解密数字证书生成与验
- AES+RSA加密解密js和java互通.zip
- UDP协议实现对等通讯Java+RSA加密解密传
- Android之RSA加密解密签名验签亲测可用
- Delphi(delphi7-XE)标准RSA加密解密签名
- Android RSA加密解密demo
- java模仿QQ通信实现RSA加密解密
- security.js RSA 加密与java客户端解密
评论
共有 条评论