From 5dcd3c64054b587572de8aea534ecff8d33d14ce Mon Sep 17 00:00:00 2001 From: Maximilien LEDOUX Date: Sun, 20 Mar 2022 14:39:18 +0100 Subject: [PATCH] =?UTF-8?q?Derni=C3=A8res=20optimisations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/lightcontainer/domains/Task.java | 1 - .../java/lightcontainer/domains/client/Context.java | 1 - .../domains/client/StoreProcessor.java | 2 +- .../domains/server/MulticastServerListener.java | 4 +--- .../domains/server/UnicastServerListener.java | 3 --- .../java/lightcontainer/interfaces/UnicastCHR.java | 1 - .../java/lightcontainer/protocol/ProtocolWriter.java | 1 - .../protocol/rules/reader/RemoveFileRule.java | 1 - .../protocol/rules/reader/RetrieveErrorRule.java | 1 - .../protocol/rules/reader/RetrieveOkRule.java | 3 +-- .../protocol/rules/reader/SavefileRule.java | 6 ++++-- .../protocol/rules/reader/SendErrorRule.java | 1 - .../protocol/rules/reader/SigninRule.java | 1 - .../protocol/rules/reader/SignoutRule.java | 1 - .../protocol/rules/writer/EraseFileRule.java | 2 -- .../protocol/rules/writer/FilesRule.java | 1 - .../protocol/rules/writer/GetFileOkRule.java | 1 - .../protocol/rules/writer/SaveFileOkRule.java | 1 - .../protocol/rules/writer/SendfileRule.java | 2 -- .../protocol/rules/writer/SignErrorRule.java | 1 - .../protocol/rules/writer/SignOkRule.java | 1 - .../java/lightcontainer/repository/FileFrontEnd.java | 4 ++-- .../repository/StoreProcessorRepository.java | 1 - .../main/java/lightcontainer/storage/AppData.java | 2 -- app/src/main/java/lightcontainer/storage/User.java | 1 - app/src/main/java/lightcontainer/utils/AES_GCM.java | 3 ++- app/src/main/java/lightcontainer/utils/SHA.java | 5 ----- app/src/main/resources/appdata.json | 11 ++++++++++- app/src/test/java/lightcontainer/AppTest.java | 3 --- .../protocol/rules/reader/HelloRuleTest.java | 2 -- .../protocol/rules/writer/SignoutRuleTest.java | 4 ---- .../lightcontainer/storage/JsonAdapterTests.java | 8 -------- .../java/lightcontainer/storage/RepositoryTests.java | 12 ------------ 33 files changed, 21 insertions(+), 71 deletions(-) diff --git a/app/src/main/java/lightcontainer/domains/Task.java b/app/src/main/java/lightcontainer/domains/Task.java index c32133d..7b61a94 100644 --- a/app/src/main/java/lightcontainer/domains/Task.java +++ b/app/src/main/java/lightcontainer/domains/Task.java @@ -3,7 +3,6 @@ package lightcontainer.domains; import lightcontainer.domains.client.Context; import lightcontainer.enumerations.TaskStatus; import lightcontainer.protocol.ProtocolWriter; -import lightcontainer.utils.Log; /** * Une tâche exécutable diff --git a/app/src/main/java/lightcontainer/domains/client/Context.java b/app/src/main/java/lightcontainer/domains/client/Context.java index 5ff19c4..99d5d9d 100644 --- a/app/src/main/java/lightcontainer/domains/client/Context.java +++ b/app/src/main/java/lightcontainer/domains/client/Context.java @@ -1,6 +1,5 @@ package lightcontainer.domains.client; -import lightcontainer.repository.ClientHandlerRepository; import lightcontainer.repository.ReadOnlyClientRepository; import lightcontainer.storage.File; import lightcontainer.storage.ReadOnlyFile; diff --git a/app/src/main/java/lightcontainer/domains/client/StoreProcessor.java b/app/src/main/java/lightcontainer/domains/client/StoreProcessor.java index e570af9..95b8ecd 100644 --- a/app/src/main/java/lightcontainer/domains/client/StoreProcessor.java +++ b/app/src/main/java/lightcontainer/domains/client/StoreProcessor.java @@ -22,7 +22,7 @@ import java.util.Objects; * @version 1.1 * @see Runnable * @see AutoCloseable - * @since 1.0Z + * @since 1.0 */ public class StoreProcessor extends UnicastThread implements AutoCloseable { // Variables diff --git a/app/src/main/java/lightcontainer/domains/server/MulticastServerListener.java b/app/src/main/java/lightcontainer/domains/server/MulticastServerListener.java index c6fc769..c87149a 100644 --- a/app/src/main/java/lightcontainer/domains/server/MulticastServerListener.java +++ b/app/src/main/java/lightcontainer/domains/server/MulticastServerListener.java @@ -3,7 +3,6 @@ package lightcontainer.domains.server; import lightcontainer.domains.client.StoreProcessor; import lightcontainer.interfaces.MulticastSPR; import lightcontainer.interfaces.ProtocolRepository; -import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.rules.reader.HelloRule; import lightcontainer.repository.FileFrontEnd; import lightcontainer.utils.Log; @@ -11,7 +10,6 @@ import lightcontainer.utils.NetChooser; import java.io.IOException; import java.net.*; -import java.util.logging.Logger; /** * StoreMulticastRunnable @@ -29,7 +27,7 @@ public class MulticastServerListener implements Runnable { private final String multicast_address; private final int multicast_port; private final String network_interface; - private FileFrontEnd ffe; + private final FileFrontEnd ffe; private final MulticastSPR repository; private final ProtocolRepository protocolRep; diff --git a/app/src/main/java/lightcontainer/domains/server/UnicastServerListener.java b/app/src/main/java/lightcontainer/domains/server/UnicastServerListener.java index cc704e2..e22124b 100644 --- a/app/src/main/java/lightcontainer/domains/server/UnicastServerListener.java +++ b/app/src/main/java/lightcontainer/domains/server/UnicastServerListener.java @@ -5,15 +5,12 @@ import lightcontainer.domains.client.Context; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.UnicastCHR; import lightcontainer.repository.FileFrontEnd; -import lightcontainer.storage.AppData; import lightcontainer.storage.Repository; -import javax.net.ssl.SSLServerSocket; import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLSocket; import java.io.IOException; import java.net.ServerSocket; -import java.net.Socket; public class UnicastServerListener implements Runnable { // Variables diff --git a/app/src/main/java/lightcontainer/interfaces/UnicastCHR.java b/app/src/main/java/lightcontainer/interfaces/UnicastCHR.java index 51f54ef..fc5431c 100644 --- a/app/src/main/java/lightcontainer/interfaces/UnicastCHR.java +++ b/app/src/main/java/lightcontainer/interfaces/UnicastCHR.java @@ -1,7 +1,6 @@ package lightcontainer.interfaces; import lightcontainer.domains.client.ClientHandler; -import lightcontainer.domains.server.MulticastServerListener; import lightcontainer.domains.server.UnicastServerListener; import lightcontainer.protocol.ProtocolWriter; import lightcontainer.repository.ClientHandlerRepository; diff --git a/app/src/main/java/lightcontainer/protocol/ProtocolWriter.java b/app/src/main/java/lightcontainer/protocol/ProtocolWriter.java index 85046e3..156649d 100644 --- a/app/src/main/java/lightcontainer/protocol/ProtocolWriter.java +++ b/app/src/main/java/lightcontainer/protocol/ProtocolWriter.java @@ -1,7 +1,6 @@ package lightcontainer.protocol; import lightcontainer.domains.client.Context; -import lightcontainer.utils.Log; import java.io.IOException; import java.io.OutputStream; diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/RemoveFileRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/RemoveFileRule.java index 496f40d..c25af96 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/RemoveFileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/RemoveFileRule.java @@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.domains.client.Context; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.protocol.ProtocolReader; -import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.protocol.rules.writer.EraseFileRule; import lightcontainer.protocol.rules.writer.RemoveFileErrorRule; import lightcontainer.storage.ReadOnlyFile; diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/RetrieveErrorRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/RetrieveErrorRule.java index c686075..bf89586 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/RetrieveErrorRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/RetrieveErrorRule.java @@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.domains.client.Context; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.protocol.ProtocolReader; -import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.protocol.rules.writer.GetFileErrorRule; import static lightcontainer.protocol.StandardizedDefinitions.SBE_RETRIEVE_RESULT_ERROR; diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/RetrieveOkRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/RetrieveOkRule.java index 67aeac4..b09f3e5 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/RetrieveOkRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/RetrieveOkRule.java @@ -6,7 +6,6 @@ import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.rules.writer.GetFileErrorRule; import lightcontainer.protocol.rules.writer.GetFileOkRule; import lightcontainer.utils.FileReceiver; -import lightcontainer.utils.Log; import lightcontainer.utils.SHA; import java.io.InputStream; @@ -38,7 +37,7 @@ public class RetrieveOkRule extends ProtocolReader { // Variables private final String filename; private final long filesize; - private String hashedFileContent; + private final String hashedFileContent; public Result(Context context, String filename, long filesize, String hashedFileContent) { super(context); diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java index 237cca6..7d8ac25 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java @@ -3,10 +3,12 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.domains.client.Context; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.protocol.ProtocolReader; -import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.protocol.rules.writer.SaveFileErrorRule; import lightcontainer.protocol.rules.writer.SendfileRule; -import lightcontainer.utils.*; +import lightcontainer.utils.AES_GCM; +import lightcontainer.utils.FileReceiver; +import lightcontainer.utils.SHA; +import lightcontainer.utils.ShaHasher; import java.io.IOException; import java.io.InputStream; diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SendErrorRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SendErrorRule.java index 21e14f2..5439e63 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SendErrorRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SendErrorRule.java @@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.domains.client.Context; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.protocol.ProtocolReader; -import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.protocol.rules.writer.SaveFileErrorRule; import static lightcontainer.protocol.StandardizedDefinitions.SBE_SEND_RESULT_ERROR; diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SigninRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SigninRule.java index 9dc7e3a..0659b43 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SigninRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SigninRule.java @@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.domains.client.Context; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.protocol.ProtocolReader; -import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.protocol.rules.writer.SignErrorRule; import lightcontainer.protocol.rules.writer.SignOkRule; diff --git a/app/src/main/java/lightcontainer/protocol/rules/reader/SignoutRule.java b/app/src/main/java/lightcontainer/protocol/rules/reader/SignoutRule.java index 17276ae..63a4f49 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SignoutRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SignoutRule.java @@ -2,7 +2,6 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.domains.client.Context; import lightcontainer.protocol.ProtocolReader; -import lightcontainer.protocol.StandardizedDefinitions; import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SIGN_OUT; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/EraseFileRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/EraseFileRule.java index 3c1c3c3..bf966e3 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/EraseFileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/EraseFileRule.java @@ -1,8 +1,6 @@ package lightcontainer.protocol.rules.writer; import lightcontainer.protocol.ProtocolWriter; -import lightcontainer.protocol.StandardizedDefinitions; -import lightcontainer.utils.Log; import static lightcontainer.protocol.StandardizedDefinitions.FFE_ERASE_FILE; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/FilesRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/FilesRule.java index 5749704..5dde723 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/FilesRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/FilesRule.java @@ -1,7 +1,6 @@ package lightcontainer.protocol.rules.writer; import lightcontainer.protocol.ProtocolWriter; -import lightcontainer.protocol.StandardizedDefinitions; import static lightcontainer.protocol.StandardizedDefinitions.FFE_FILE_LIST_RESULT; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/GetFileOkRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/GetFileOkRule.java index ec2ab61..5eb049f 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/GetFileOkRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/GetFileOkRule.java @@ -4,7 +4,6 @@ import lightcontainer.domains.client.Context; import lightcontainer.protocol.ProtocolWriter; import lightcontainer.utils.DeepFileEraser; import lightcontainer.utils.FileSender; -import lightcontainer.utils.Log; import java.io.IOException; import java.io.OutputStream; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/SaveFileOkRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/SaveFileOkRule.java index 80f1085..a4f2246 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/SaveFileOkRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SaveFileOkRule.java @@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.writer; import lightcontainer.domains.client.Context; import lightcontainer.protocol.ProtocolWriter; import lightcontainer.utils.DeepFileEraser; -import lightcontainer.utils.Log; import static lightcontainer.protocol.StandardizedDefinitions.FFE_SAVE_FILE_OK; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java index e46d8b8..8871ce6 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SendfileRule.java @@ -2,9 +2,7 @@ package lightcontainer.protocol.rules.writer; import lightcontainer.domains.client.Context; import lightcontainer.protocol.ProtocolWriter; -import lightcontainer.protocol.StandardizedDefinitions; import lightcontainer.utils.FileSender; -import lightcontainer.utils.Log; import java.io.IOException; import java.io.OutputStream; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/SignErrorRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/SignErrorRule.java index 394ca0b..34dfba6 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/SignErrorRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SignErrorRule.java @@ -1,7 +1,6 @@ package lightcontainer.protocol.rules.writer; import lightcontainer.protocol.ProtocolWriter; -import lightcontainer.protocol.StandardizedDefinitions; import static lightcontainer.protocol.StandardizedDefinitions.FFE_SIGN_ERROR; diff --git a/app/src/main/java/lightcontainer/protocol/rules/writer/SignOkRule.java b/app/src/main/java/lightcontainer/protocol/rules/writer/SignOkRule.java index ee454f6..63b5019 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/writer/SignOkRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/writer/SignOkRule.java @@ -1,7 +1,6 @@ package lightcontainer.protocol.rules.writer; import lightcontainer.protocol.ProtocolWriter; -import lightcontainer.protocol.StandardizedDefinitions; import static lightcontainer.protocol.StandardizedDefinitions.FFE_SIGN_OK; diff --git a/app/src/main/java/lightcontainer/repository/FileFrontEnd.java b/app/src/main/java/lightcontainer/repository/FileFrontEnd.java index 66d1df5..dd4e516 100644 --- a/app/src/main/java/lightcontainer/repository/FileFrontEnd.java +++ b/app/src/main/java/lightcontainer/repository/FileFrontEnd.java @@ -1,8 +1,8 @@ package lightcontainer.repository; +import lightcontainer.domains.Task; import lightcontainer.domains.client.Context; import lightcontainer.domains.client.StoreProcessor; -import lightcontainer.domains.Task; import lightcontainer.interfaces.ClientHandlerFFE; import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.StoreProcessorFFE; @@ -14,7 +14,7 @@ import java.util.concurrent.ConcurrentLinkedDeque; public class FileFrontEnd implements ClientHandlerFFE, StoreProcessorFFE { // Variables - private Deque tasks = new ConcurrentLinkedDeque<>(); + private final Deque tasks = new ConcurrentLinkedDeque<>(); private final ClientHandlerRepository clientRepository; // TODO -> pourquoi pas une interface ? end private final StoreProcessorRepository storeRepository; // TODO -> pourquoi pas une interface ? end private ProtocolRepository protocolRepository; diff --git a/app/src/main/java/lightcontainer/repository/StoreProcessorRepository.java b/app/src/main/java/lightcontainer/repository/StoreProcessorRepository.java index 934fb25..7c17186 100644 --- a/app/src/main/java/lightcontainer/repository/StoreProcessorRepository.java +++ b/app/src/main/java/lightcontainer/repository/StoreProcessorRepository.java @@ -8,7 +8,6 @@ import lightcontainer.interfaces.MulticastSPR; import java.time.LocalDateTime; import java.util.Collection; import java.util.HashSet; -import java.util.Iterator; import java.util.Set; // TODO : C'est genre un ClientHandlerManager quoi hein, normal qu'il fasse blinder de chose ;) diff --git a/app/src/main/java/lightcontainer/storage/AppData.java b/app/src/main/java/lightcontainer/storage/AppData.java index 296c655..29f22f0 100644 --- a/app/src/main/java/lightcontainer/storage/AppData.java +++ b/app/src/main/java/lightcontainer/storage/AppData.java @@ -1,7 +1,5 @@ package lightcontainer.storage; -import lightcontainer.utils.Log; - import java.util.HashMap; import java.util.Iterator; import java.util.List; diff --git a/app/src/main/java/lightcontainer/storage/User.java b/app/src/main/java/lightcontainer/storage/User.java index 6f8eaf9..19344a9 100644 --- a/app/src/main/java/lightcontainer/storage/User.java +++ b/app/src/main/java/lightcontainer/storage/User.java @@ -1,7 +1,6 @@ package lightcontainer.storage; import lightcontainer.utils.BCryptHasher; -import lightcontainer.utils.Log; import java.util.ArrayList; import java.util.Iterator; diff --git a/app/src/main/java/lightcontainer/utils/AES_GCM.java b/app/src/main/java/lightcontainer/utils/AES_GCM.java index b37474f..b1ee565 100644 --- a/app/src/main/java/lightcontainer/utils/AES_GCM.java +++ b/app/src/main/java/lightcontainer/utils/AES_GCM.java @@ -3,7 +3,8 @@ package lightcontainer.utils; import javax.crypto.*; import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.SecretKeySpec; -import java.io.*; +import java.io.InputStream; +import java.io.OutputStream; import java.nio.charset.StandardCharsets; import java.security.*; import java.util.Base64; diff --git a/app/src/main/java/lightcontainer/utils/SHA.java b/app/src/main/java/lightcontainer/utils/SHA.java index 66656e5..66cbcb5 100644 --- a/app/src/main/java/lightcontainer/utils/SHA.java +++ b/app/src/main/java/lightcontainer/utils/SHA.java @@ -3,12 +3,7 @@ package lightcontainer.utils; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.security.GeneralSecurityException; import java.security.MessageDigest; -import java.util.Base64; /** * SHA 256 Hashing and borrowing Class [DO NOT EDIT] diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index c23e22a..aef75a5 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -1 +1,10 @@ -{"unicast_port":8000,"multicast_ip":"224.66.66.1","multicast_port":15502,"network_interface":"tun0","tls":false,"storagePath":"/home/benjamin/ffe","users":[{"name":"90004142","password":"$2a$10$4/YHWJNlS40X5duOYpRaPOk7XcE5eWXqpTBfnWivDx9BeIjpPxs.u","aes_key":"i7+O+euhXRqgjW2IGmW+5KfPuS+olP11S+J44q4rdnY=","files":[]},{"name":"900024935","password":"$2a$10$nsLkeXZrkpFtvp/Db63cseLvP7DEMtfwMxHbFzF/T15xuYZW1EhC2","aes_key":"hT4t7hB2n3iq/2EdZP32HAbO8o/gY20y9uF0QO/BgaU=","files":[]},{"name":"900039267","password":"$2a$10$kYrVuD.ILwuXdB7FBxOtwupBpGGdSauMOGuA4OUpYobbWE8Fh2VRu","aes_key":"d8ESyVJuCZrDmUY94uKdpCd7IG5ZjOwaAeMEcL6TWvU=","files":[]},{"name":"aaaaa","password":"$2a$10$mhJW5GO3xGKeZBURpdBvi.IuhZBCCosvej/XI3RlPqYsoAb2id8V2","aes_key":"GBKZZ+kmXqb0QEXac9AJZuaAjCykb2m4W+aPNHp4V0Q=","files":[]},{"name":"900038231","password":"$2a$10$8l1ZBBG.fzHVn6XryuXrfemqgBJ/cZXnbNuiGX/iGLOIVXr7dQ1OW","aes_key":"I3jt+93WG5f5nsbyMeBNBS39RRTq03AVeTs2x7wRzew=","files":[]},{"name":"900018980","password":"$2a$10$Z0KO/nc6NliGbFSKNyiGVeEaFTlwIERr6gZEJ3AehC8F3GbKaU2M2","aes_key":"Bxoonmos9zTStu8xoZJ3alsySjXztU1e5km07J8XHbE=","files":[]},{"name":"900031619","password":"$2a$10$/lLbtuR8354764g6MWJgP.yxMQyapwm/wj.n21bUgG.ABlkSoiaKK","aes_key":"m0FlcdCIsTbz/3OSWwr535jozKLYizddIBBgkjG7Bf0=","files":[]},{"name":"123456789","password":"$2a$10$zYzJHeUZXcLPCbeHcvVeGuXxFLAyu6QuPl243M6Jdm1LJzq5RzmuW","aes_key":"D22bldMnDxgR1YWEdzcSNqG0Jqwi5AWlcFKZhuH9/jk=","files":[]},{"name":"900033729","password":"$2a$10$/xovzQW0k.i/91z9AtyKuOaz./XEYJantFER3uPxeFvNvuE6rQzv.","aes_key":"j/CCk8TH0TZ96SyA+R76bAJP9l5sx4hXFrGKQ1+Eixo=","files":[]},{"name":"900015602","password":"$2a$10$48WmUiwoOafmyq74jTcj1uC3Q3Pccl7B1LEBxZMwz.Chj9P0hvIgu","aes_key":"eKGrhHdsHodSubNDWXG1IxrkdZO7MjHD317qLxnmQB8=","files":[]},{"name":"900030864","password":"$2a$10$VHHHic9iaMGQAQvwlEHhfOed0kIt1Im2SiD7wrtOuzl5ZbeTzqNJK","aes_key":"i5yTL2okyVTKkxaHYSB6JeG3o+v4HkIBohFyCYeraBI=","files":[]},{"name":"900013901","password":"$2a$10$aFYP84tfEmRrbOHZf6wTou8NFlVynOSmeYTNKo0kZqPFUMc.IN1uq","aes_key":"0Bk+UvERHWZX8t5pRnN0adX89rR9QQBrFkW+g50NzgY=","files":[]},{"name":"900021093","password":"$2a$10$1Vf4XUaH8qZrVV7U3ynUD.8AJyqvXaGFYA/XPNrNShznAxfrM9UB2","aes_key":"18Hlf3PsCzAO4MawJdZONENW3n1QLeUp0DtlFP6tzz8=","files":[]},{"name":"900042724","password":"$2a$10$QmWBlwkP.K08mY4XDf8WmOxepXvpBWOGpqrNrPQuRbK8fklUw9V5q","aes_key":"d+Ts4ri4hFbZdO3HXfza4ycAHDq0YdxBQ503DsC24CE=","files":[]},{"name":"900028534","password":"$2a$10$HUFfWTMSWay1EL5t1uidSe58GPREvavjN1SsDo/4CM58WWo1obiX2","aes_key":"ZikM2g8iTS5vLsENkcespYlEQhgQFpBW5k1CFifXZpo=","files":[]},{"name":"90006184","password":"$2a$10$GslCWOSL1znNJYR80xbvIuoDmaWN2FoNmk1fzqfhXdHJgOsRIU2F.","aes_key":"iCgLxd7w3XFHVeoldSuyrlRierCkiD1F33QaQqQ+RV8=","files":[]},{"name":"900043975","password":"$2a$10$C7aaCyVoga63NhQRFvNT0uZmw/i5nQZkl.kYzQE7m99OtEMMoz03e","aes_key":"t5J/WIryBVIaxuxhsnlGJtNdd13TD/+JiJ703TxJQbI=","files":[]},{"name":"900026119","password":"$2a$10$Uu8hTLKJ6laJk4Hnxqw6rOcbws.MK4mSHvGhGSsfNgVoIAeACz302","aes_key":"Yt9OFnVdL4Q6OrGPL3JJbsMydZ3mpLR8FLip5Y5asBw=","files":[]},{"name":"900049525","password":"$2a$10$91Yhg.if8Cb/6iVeh7Hq2.WJq7PGDaZBWlJZ5nQihrokBqfVcaHQ6","aes_key":"CjA40gwN/NgmlTbgAVJwGbIK4lQTpHKLfqFoY4eYabI=","files":[]},{"name":"900049924","password":"$2a$10$ahfO42ImHO8n9CM6HzvUBuv7GoVx2U29aPo2w/6YBlfkd97oD0B0G","aes_key":"iioHKN0vMqrI2q/42ho3Wz99CKOYhVUwg+KvL0hp16Y=","files":[]},{"name":"900049517","password":"$2a$10$8IQr27MBkYZI0Fvh9UBwvekTM6PYsbRK4BJS/TweSYC3XdPyDEk0e","aes_key":"WgcV03geOWoVsE29g3zJeM44r9sK6HqoRK4qLwQ9jyQ=","files":[]}]} \ No newline at end of file +{ + "unicast_port": 8000, + "multicast_ip": "224.66.66.1", + "multicast_port": 15502, + "network_interface": "tun0", + "tls": false, + "storagePath": "C:\\Users\\ledou\\Documents\\ffe", + "users": [ + ] +} \ No newline at end of file diff --git a/app/src/test/java/lightcontainer/AppTest.java b/app/src/test/java/lightcontainer/AppTest.java index 9d64c1d..7b15e0f 100644 --- a/app/src/test/java/lightcontainer/AppTest.java +++ b/app/src/test/java/lightcontainer/AppTest.java @@ -3,9 +3,6 @@ */ package lightcontainer; -import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - class AppTest { // @Test void appHasAGreeting() { // App classUnderTest = new App(); diff --git a/app/src/test/java/lightcontainer/protocol/rules/reader/HelloRuleTest.java b/app/src/test/java/lightcontainer/protocol/rules/reader/HelloRuleTest.java index 0f5f0fe..61aa17e 100644 --- a/app/src/test/java/lightcontainer/protocol/rules/reader/HelloRuleTest.java +++ b/app/src/test/java/lightcontainer/protocol/rules/reader/HelloRuleTest.java @@ -3,8 +3,6 @@ package lightcontainer.protocol.rules.reader; import lightcontainer.protocol.ProtocolReader; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - class HelloRuleTest { @Test diff --git a/app/src/test/java/lightcontainer/protocol/rules/writer/SignoutRuleTest.java b/app/src/test/java/lightcontainer/protocol/rules/writer/SignoutRuleTest.java index cb3af1e..0787cd7 100644 --- a/app/src/test/java/lightcontainer/protocol/rules/writer/SignoutRuleTest.java +++ b/app/src/test/java/lightcontainer/protocol/rules/writer/SignoutRuleTest.java @@ -1,11 +1,7 @@ package lightcontainer.protocol.rules.writer; -import lightcontainer.protocol.ProtocolWriter; -import lightcontainer.protocol.rules.reader.SignoutRule; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; - class SignoutRuleTest { @Test diff --git a/app/src/test/java/lightcontainer/storage/JsonAdapterTests.java b/app/src/test/java/lightcontainer/storage/JsonAdapterTests.java index 2e46763..f815608 100644 --- a/app/src/test/java/lightcontainer/storage/JsonAdapterTests.java +++ b/app/src/test/java/lightcontainer/storage/JsonAdapterTests.java @@ -1,13 +1,5 @@ package lightcontainer.storage; -import org.junit.jupiter.api.Test; - -import java.util.HashSet; -import java.util.Set; - -import static org.junit.jupiter.api.Assertions.*; - - public class JsonAdapterTests { /* @Test diff --git a/app/src/test/java/lightcontainer/storage/RepositoryTests.java b/app/src/test/java/lightcontainer/storage/RepositoryTests.java index 4880790..0c169b9 100644 --- a/app/src/test/java/lightcontainer/storage/RepositoryTests.java +++ b/app/src/test/java/lightcontainer/storage/RepositoryTests.java @@ -1,17 +1,5 @@ package lightcontainer.storage; -import org.junit.jupiter.api.AfterEach; -import org.junit.jupiter.api.Test; - -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.HashSet; -import java.util.Set; - -import static org.junit.jupiter.api.Assertions.*; - - public class RepositoryTests { /*