Skip to content

Commit

Permalink
Ver 1.2.2
Browse files Browse the repository at this point in the history
修复了1.1的遗留问题之AES-128-CBC并未满血发挥
  • Loading branch information
Core-65536 committed Jun 10, 2024
1 parent 8920ced commit 2bd45d9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
Binary file modified out/artifacts/Java_Talk/Java-Talk.jar
Binary file not shown.
1 change: 1 addition & 0 deletions src/main/java/top/c0r3/talk/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public static void main(String[] args) throws Exception {
String seed = sc.next();

ZzSecurityHelper.setKey(kg.generateKey(seed));
ZzSecurityHelper.setIv(kg.generateKey(seed+seed));
server.SelfServerInfo = serverInfo;

server server = new server();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/top/c0r3/talk/client/Command.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public static void Process(String command) {
String seed = sc.next();
generateEncryptKey kg = new generateEncryptKey();
ZzSecurityHelper.setKey(kg.generateKey(seed));
ZzSecurityHelper.setIv(kg.generateKey(seed+seed));

System.out.print("Input Your NickName:");
String nickname = sc.next();
Expand Down
1 change: 1 addition & 0 deletions src/main/java/top/c0r3/talk/client/client.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public void Init() {
String seed = sc.next();

ZzSecurityHelper.setKey(kg.generateKey(seed));
ZzSecurityHelper.setIv(kg.generateKey(seed+seed));
RunningMode = 1;
}
}
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/top/c0r3/talk/encrypt/ZzSecurityHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ public class ZzSecurityHelper {
public static void setKey(String key) {
ZzSecurityHelper.key = key;
}
private static final String iv ="NIfb&CoreY86Gfgh";
private static String iv ="NIfb&CoreY86Gfgh";
public static void setIv(String iv){
ZzSecurityHelper.iv = iv;
}
public static String encryptAES(String data){
try {
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
Expand Down

0 comments on commit 2bd45d9

Please sign in to comment.