摘要:
加密和签名使用不同的密钥对,签名密钥对的私钥用于签名,其对应的公钥用于验证签名。 加密密钥对的公钥用于加密,其对应的私钥用于解密。 1.生成密钥对 /** * 生成RSA随机密钥对(公钥和私钥) * @return */ public static Map<String, String> creat 阅读全文
posted @ 2020-01-20 00:32
hello4world
阅读(759)
评论(0)
推荐(0)
摘要:
1.生成AES Key /** * AES根据密码生成Key * @param password * @return */ public static Key createKey(String password) { // 构造密码生成器,指定为AES算法 try { KeyGenerator ke 阅读全文
posted @ 2020-01-19 23:15
hello4world
阅读(318)
评论(0)
推荐(0)
摘要:
1.依赖(这依赖添加了slf4j和log4j) <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> <version>1.7.30</version> </dependency> 2.配置l 阅读全文
posted @ 2020-01-19 00:44
hello4world
阅读(171)
评论(0)
推荐(0)
摘要:
1.创建连接,下载MySQL驱动(JDBC接口的实现类,就是一个jar包) public class Demo01 { public static void main(String[] args) throws ClassNotFoundException, SQLException { //1. 阅读全文
posted @ 2020-01-14 00:31
hello4world
阅读(473)
评论(0)
推荐(0)
摘要:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Bootstrap Template</title> <meta name="viewport" content="width=device-width,initial-scale 阅读全文
posted @ 2020-01-10 23:42
hello4world
阅读(474)
评论(0)
推荐(0)
摘要:
<!DOCTYPE> <html> <head> <title>基本选择器练习</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <style type="text/css"> body{ font 阅读全文
posted @ 2020-01-10 23:38
hello4world
阅读(879)
评论(0)
推荐(0)
摘要:
1.HTML部分 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Insert title here</title> <!-- 引入css文件 --> <link rel="stylesheet" href="login.css 阅读全文
posted @ 2020-01-10 23:01
hello4world
阅读(867)
评论(0)
推荐(0)
摘要:
1.h1~h6 p b i br <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>第一个html页面</title> </head> <body> <h1 align="right">这是h1</h1> <h2 align="c 阅读全文
posted @ 2020-01-10 00:32
hello4world
阅读(223)
评论(0)
推荐(0)
摘要:
1. com.webserver.core /** * WebServer是模拟Tomcat的一个web容器 * web容器可以同时管理多个网络应用,并且提供了与客户端(通常是浏览器)的网络连接以及传输数据 * 和与客户端的应用层交互(涉及到TCP协议以及HTTP协议)上面的支持。有了web容器,使 阅读全文
posted @ 2020-01-09 00:35
hello4world
阅读(328)
评论(0)
推荐(0)
摘要:
HTTP协议:超文本传输协议浏览器与服务端之间传输数据的协议,底层的传输协议为TCP。HTTP则为应用层协议,负责定义传输数据的格式。 HTTP协议分为1.0与1.1两个版本。现在常用为1.1版本。 协议规定客户端与服务端通讯方式为:一次请求一次响应即:客户端发起请求,服务端接收到请求后向客户端发送 阅读全文
posted @ 2020-01-08 23:32
hello4world
阅读(159)
评论(0)
推荐(0)