Skip to content

Commit cc70b69

Browse files
committed
update
1 parent d43c387 commit cc70b69

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ public static void main(String[] args) {
2424
* 凯撒密码加解密公式
2525

2626
- 加密
27-
27+
2828
![](imgs/513169b7dcabfc4de6d4fcbc03e613434244e917.svg)
29-
29+
3030
- 解密
3131

3232
![](imgs/110911f42b858bdf1bec629ae41b5b88b00859e2.svg)
33-
34-
33+
34+
3535
- 凯撒密码中的加密三要素
3636
- 明文/密文
3737
- 明文: 图表上部分的数据
@@ -208,12 +208,12 @@ public static void main(String[] args) {
208208
- des/3des -> 8字节
209209
- aes -> 16字节
210210
- 加解密使用的初始化向量相同
211-
211+
212212
- DES加密示例代码如下:
213213
- DES加密,key的大小必须是8个字节
214214
- 如果没有指定分组密码模式和填充模式,ECB/PKCS5Padding就是默认值
215215
- 如果指定分组密码模式为CBC,必须指定初始向量,初始向量中密钥的长度必须是8个字节
216-
- 如果没有指定填充模式为NoPadding模式,原文的长度必须是8个字节的整倍数
216+
- NoPadding模式,原文的长度必须是8个字节的整倍数
217217
```$xslt
218218
public class DESDemo {
219219
// DES加密算法,key的大小必须是8个字节
@@ -270,12 +270,12 @@ public static void main(String[] args) {
270270
return new String(bytes);
271271
}
272272
}
273-
```
273+
```
274274
- AES加密示例代码如下(AES和DES加密高度类似)
275275
- AES加密,key的大小必须是16个字节
276276
- 如果没有指定分组密码模式和填充模式,ECB/PKCS5Padding就是默认值
277277
- 如果没有指定分组密码模式为CBC,必须指定初始向量,初始向量中密钥的长度必须是16个字节
278-
- 如果没有指定填充模式为NoPadding模式,原文的长度必须是16个字节的整倍数
278+
- NoPadding模式,原文的长度必须是16个字节的整倍数
279279
```$xslt
280280
public class AESDemo {
281281
// AES加密算法,key的大小必须是16个字节
@@ -426,7 +426,7 @@ public class AESDemo {
426426
String decrypt = RSADemo.RSADecrypt(algorithm, publicKey, eText, 256);
427427
System.out.println("decript###" + decrypt + "###");
428428
```
429-
429+
430430
- 后端代码
431431
```java
432432
public class RSADemo {

0 commit comments

Comments
 (0)