* refactoring

Signed-off-by: CubeBit <denis-seredenko@ukr.net>
This commit is contained in:
2023-08-02 14:29:56 +02:00
parent 251532493f
commit fe3a0820cf
7 changed files with 57 additions and 33 deletions

View File

@@ -13,20 +13,21 @@ import java.security.PublicKey;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
public class Server {
public static List<ClientHandler> clients = new ArrayList<>();
static List<ClientHandler> clients = new ArrayList<>();
public static HashMap<String, PublicKey> clientKeys = new HashMap<>();
static Map<String, PublicKey> clientKeys = new HashMap<>();
public static ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(20);
static ThreadPoolExecutor executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(20);
public static KeyPair serverKeys;
static KeyPair serverKeys;
public static SecretKey aesKey;
static SecretKey aesKey;
public static void main(String[] args) throws IOException, ArgumentsException, NoSuchAlgorithmException {
Server.serverKeys = EncryptionUtil.generateRSAKeys();