Compare commits

..

10 Commits

Author SHA1 Message Date
fd7484a81a
update gradle 2022-03-20 15:26:34 +01:00
575f22b42e
Fix gitignore 2022-03-20 15:20:29 +01:00
2e07a6c736
Fix workspace.xml 2022-03-20 15:13:28 +01:00
004dfc3c6a
Fix gradle 2022-03-20 15:12:59 +01:00
Maximilien LEDOUX
1cee0e63af Merge branch 'dev' 2022-03-20 15:02:35 +01:00
Maximilien LEDOUX
f43d591de5 README.md et purge du JSON 2022-03-20 15:01:44 +01:00
Maximilien LEDOUX
5dcd3c6405 Dernières optimisations 2022-03-20 14:39:18 +01:00
Benjamin
2c6a2564b5 Merge branch 'dev' 2022-03-12 19:09:24 +01:00
Benjamin
4974b64e18 Merge branch 'dev'
# Conflicts:
#	.idea/compiler.xml
#	.idea/discord.xml
#	.idea/misc.xml
#	gradle/wrapper/gradle-wrapper.jar
#	gradle/wrapper/gradle-wrapper.properties
#	gradlew
2022-03-08 19:46:07 +01:00
14bebf12b9
/ 2022-02-22 08:50:10 +01:00
43 changed files with 41 additions and 202 deletions

3
.gitignore vendored
View File

@ -148,6 +148,9 @@ gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar !gradle-wrapper.jar
# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties
# Cache of project # Cache of project
.gradletasknamecache .gradletasknamecache

8
.idea/.gitignore vendored
View File

@ -1,8 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<bytecodeTargetLevel target="11" />
</component>
</project>

View File

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
<option name="description" value="" />
</component>
</project>

View File

@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="InfiniteLoopStatement" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="MavenRepo" />
<option name="name" value="MavenRepo" />
<option name="url" value="https://repo.maven.apache.org/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
</component>
</project>

View File

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="libraries-with-intellij-classes">
<option name="intellijApiContainingLibraries">
<list>
<LibraryCoordinatesState>
<option name="artifactId" value="ideaIU" />
<option name="groupId" value="com.jetbrains.intellij.idea" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="ideaIU" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="ideaIC" />
<option name="groupId" value="com.jetbrains.intellij.idea" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="ideaIC" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="pycharmPY" />
<option name="groupId" value="com.jetbrains.intellij.pycharm" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="pycharmPY" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="pycharmPC" />
<option name="groupId" value="com.jetbrains.intellij.pycharm" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="pycharmPC" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="clion" />
<option name="groupId" value="com.jetbrains.intellij.clion" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="clion" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="riderRD" />
<option name="groupId" value="com.jetbrains.intellij.rider" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="riderRD" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="goland" />
<option name="groupId" value="com.jetbrains.intellij.goland" />
</LibraryCoordinatesState>
<LibraryCoordinatesState>
<option name="artifactId" value="goland" />
<option name="groupId" value="com.jetbrains" />
</LibraryCoordinatesState>
</list>
</option>
</component>
</project>

View File

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="FrameworkDetectionExcludesConfiguration">
<file type="web" url="file://$PROJECT_DIR$" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
</project>

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

View File

@ -0,0 +1,17 @@
# FileFrontEnd
## Configuration
### Technologies utilisées
* Java 11 (ressources informatiques)
* Gradle 7.1
### Projet
* src > main > resources > appdata.json -> Fichier de configuration à modifier
* storagePath : indiquer le dossier où les fichiers temporaires du FFE seront stockés
* network_interface : indiquer l'interface réseau à utiliser. Si elle n'est pas bonne, le programme demande laquelle utiliser au démarrage
`IMPORTANT: L'application doit absolument être démarré avec Gradle 7.1 !`

View File

@ -3,7 +3,6 @@ package lightcontainer.domains;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.enumerations.TaskStatus; import lightcontainer.enumerations.TaskStatus;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.utils.Log;
/** /**
* Une tâche exécutable * Une tâche exécutable

View File

@ -1,6 +1,5 @@
package lightcontainer.domains.client; package lightcontainer.domains.client;
import lightcontainer.repository.ClientHandlerRepository;
import lightcontainer.repository.ReadOnlyClientRepository; import lightcontainer.repository.ReadOnlyClientRepository;
import lightcontainer.storage.File; import lightcontainer.storage.File;
import lightcontainer.storage.ReadOnlyFile; import lightcontainer.storage.ReadOnlyFile;

View File

@ -22,7 +22,7 @@ import java.util.Objects;
* @version 1.1 * @version 1.1
* @see Runnable * @see Runnable
* @see AutoCloseable * @see AutoCloseable
* @since 1.0Z * @since 1.0
*/ */
public class StoreProcessor extends UnicastThread implements AutoCloseable { public class StoreProcessor extends UnicastThread implements AutoCloseable {
// Variables // Variables

View File

@ -3,7 +3,6 @@ package lightcontainer.domains.server;
import lightcontainer.domains.client.StoreProcessor; import lightcontainer.domains.client.StoreProcessor;
import lightcontainer.interfaces.MulticastSPR; import lightcontainer.interfaces.MulticastSPR;
import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.rules.reader.HelloRule; import lightcontainer.protocol.rules.reader.HelloRule;
import lightcontainer.repository.FileFrontEnd; import lightcontainer.repository.FileFrontEnd;
import lightcontainer.utils.Log; import lightcontainer.utils.Log;
@ -11,7 +10,6 @@ import lightcontainer.utils.NetChooser;
import java.io.IOException; import java.io.IOException;
import java.net.*; import java.net.*;
import java.util.logging.Logger;
/** /**
* StoreMulticastRunnable * StoreMulticastRunnable
@ -29,7 +27,7 @@ public class MulticastServerListener implements Runnable {
private final String multicast_address; private final String multicast_address;
private final int multicast_port; private final int multicast_port;
private final String network_interface; private final String network_interface;
private FileFrontEnd ffe; private final FileFrontEnd ffe;
private final MulticastSPR repository; private final MulticastSPR repository;
private final ProtocolRepository protocolRep; private final ProtocolRepository protocolRep;

View File

@ -5,15 +5,12 @@ import lightcontainer.domains.client.Context;
import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.interfaces.UnicastCHR; import lightcontainer.interfaces.UnicastCHR;
import lightcontainer.repository.FileFrontEnd; import lightcontainer.repository.FileFrontEnd;
import lightcontainer.storage.AppData;
import lightcontainer.storage.Repository; import lightcontainer.storage.Repository;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory; import javax.net.ssl.SSLServerSocketFactory;
import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocket;
import java.io.IOException; import java.io.IOException;
import java.net.ServerSocket; import java.net.ServerSocket;
import java.net.Socket;
public class UnicastServerListener implements Runnable { public class UnicastServerListener implements Runnable {
// Variables // Variables

View File

@ -1,7 +1,6 @@
package lightcontainer.interfaces; package lightcontainer.interfaces;
import lightcontainer.domains.client.ClientHandler; import lightcontainer.domains.client.ClientHandler;
import lightcontainer.domains.server.MulticastServerListener;
import lightcontainer.domains.server.UnicastServerListener; import lightcontainer.domains.server.UnicastServerListener;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.repository.ClientHandlerRepository; import lightcontainer.repository.ClientHandlerRepository;

View File

@ -1,7 +1,6 @@
package lightcontainer.protocol; package lightcontainer.protocol;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.utils.Log;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;

View File

@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.protocol.rules.writer.EraseFileRule; import lightcontainer.protocol.rules.writer.EraseFileRule;
import lightcontainer.protocol.rules.writer.RemoveFileErrorRule; import lightcontainer.protocol.rules.writer.RemoveFileErrorRule;
import lightcontainer.storage.ReadOnlyFile; import lightcontainer.storage.ReadOnlyFile;

View File

@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.protocol.rules.writer.GetFileErrorRule; import lightcontainer.protocol.rules.writer.GetFileErrorRule;
import static lightcontainer.protocol.StandardizedDefinitions.SBE_RETRIEVE_RESULT_ERROR; import static lightcontainer.protocol.StandardizedDefinitions.SBE_RETRIEVE_RESULT_ERROR;

View File

@ -6,7 +6,6 @@ import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.rules.writer.GetFileErrorRule; import lightcontainer.protocol.rules.writer.GetFileErrorRule;
import lightcontainer.protocol.rules.writer.GetFileOkRule; import lightcontainer.protocol.rules.writer.GetFileOkRule;
import lightcontainer.utils.FileReceiver; import lightcontainer.utils.FileReceiver;
import lightcontainer.utils.Log;
import lightcontainer.utils.SHA; import lightcontainer.utils.SHA;
import java.io.InputStream; import java.io.InputStream;
@ -38,7 +37,7 @@ public class RetrieveOkRule extends ProtocolReader {
// Variables // Variables
private final String filename; private final String filename;
private final long filesize; private final long filesize;
private String hashedFileContent; private final String hashedFileContent;
public Result(Context context, String filename, long filesize, String hashedFileContent) { public Result(Context context, String filename, long filesize, String hashedFileContent) {
super(context); super(context);

View File

@ -3,10 +3,12 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.protocol.rules.writer.SaveFileErrorRule; import lightcontainer.protocol.rules.writer.SaveFileErrorRule;
import lightcontainer.protocol.rules.writer.SendfileRule; 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.IOException;
import java.io.InputStream; import java.io.InputStream;

View File

@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.protocol.rules.writer.SaveFileErrorRule; import lightcontainer.protocol.rules.writer.SaveFileErrorRule;
import static lightcontainer.protocol.StandardizedDefinitions.SBE_SEND_RESULT_ERROR; import static lightcontainer.protocol.StandardizedDefinitions.SBE_SEND_RESULT_ERROR;

View File

@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.protocol.rules.writer.SignErrorRule; import lightcontainer.protocol.rules.writer.SignErrorRule;
import lightcontainer.protocol.rules.writer.SignOkRule; import lightcontainer.protocol.rules.writer.SignOkRule;

View File

@ -2,7 +2,6 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.ProtocolReader;
import lightcontainer.protocol.StandardizedDefinitions;
import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SIGN_OUT; import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SIGN_OUT;

View File

@ -1,8 +1,6 @@
package lightcontainer.protocol.rules.writer; package lightcontainer.protocol.rules.writer;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.utils.Log;
import static lightcontainer.protocol.StandardizedDefinitions.FFE_ERASE_FILE; import static lightcontainer.protocol.StandardizedDefinitions.FFE_ERASE_FILE;

View File

@ -1,7 +1,6 @@
package lightcontainer.protocol.rules.writer; package lightcontainer.protocol.rules.writer;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.protocol.StandardizedDefinitions;
import static lightcontainer.protocol.StandardizedDefinitions.FFE_FILE_LIST_RESULT; import static lightcontainer.protocol.StandardizedDefinitions.FFE_FILE_LIST_RESULT;

View File

@ -4,7 +4,6 @@ import lightcontainer.domains.client.Context;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.utils.DeepFileEraser; import lightcontainer.utils.DeepFileEraser;
import lightcontainer.utils.FileSender; import lightcontainer.utils.FileSender;
import lightcontainer.utils.Log;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;

View File

@ -3,7 +3,6 @@ package lightcontainer.protocol.rules.writer;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.utils.DeepFileEraser; import lightcontainer.utils.DeepFileEraser;
import lightcontainer.utils.Log;
import static lightcontainer.protocol.StandardizedDefinitions.FFE_SAVE_FILE_OK; import static lightcontainer.protocol.StandardizedDefinitions.FFE_SAVE_FILE_OK;

View File

@ -2,9 +2,7 @@ package lightcontainer.protocol.rules.writer;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.protocol.StandardizedDefinitions;
import lightcontainer.utils.FileSender; import lightcontainer.utils.FileSender;
import lightcontainer.utils.Log;
import java.io.IOException; import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;

View File

@ -1,7 +1,6 @@
package lightcontainer.protocol.rules.writer; package lightcontainer.protocol.rules.writer;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.protocol.StandardizedDefinitions;
import static lightcontainer.protocol.StandardizedDefinitions.FFE_SIGN_ERROR; import static lightcontainer.protocol.StandardizedDefinitions.FFE_SIGN_ERROR;

View File

@ -1,7 +1,6 @@
package lightcontainer.protocol.rules.writer; package lightcontainer.protocol.rules.writer;
import lightcontainer.protocol.ProtocolWriter; import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.protocol.StandardizedDefinitions;
import static lightcontainer.protocol.StandardizedDefinitions.FFE_SIGN_OK; import static lightcontainer.protocol.StandardizedDefinitions.FFE_SIGN_OK;

View File

@ -1,8 +1,8 @@
package lightcontainer.repository; package lightcontainer.repository;
import lightcontainer.domains.Task;
import lightcontainer.domains.client.Context; import lightcontainer.domains.client.Context;
import lightcontainer.domains.client.StoreProcessor; import lightcontainer.domains.client.StoreProcessor;
import lightcontainer.domains.Task;
import lightcontainer.interfaces.ClientHandlerFFE; import lightcontainer.interfaces.ClientHandlerFFE;
import lightcontainer.interfaces.ProtocolRepository; import lightcontainer.interfaces.ProtocolRepository;
import lightcontainer.interfaces.StoreProcessorFFE; import lightcontainer.interfaces.StoreProcessorFFE;
@ -14,7 +14,7 @@ import java.util.concurrent.ConcurrentLinkedDeque;
public class FileFrontEnd implements ClientHandlerFFE, StoreProcessorFFE { public class FileFrontEnd implements ClientHandlerFFE, StoreProcessorFFE {
// Variables // Variables
private Deque<Task> tasks = new ConcurrentLinkedDeque<>(); private final Deque<Task> tasks = new ConcurrentLinkedDeque<>();
private final ClientHandlerRepository clientRepository; // TODO -> pourquoi pas une interface ? end private final ClientHandlerRepository clientRepository; // TODO -> pourquoi pas une interface ? end
private final StoreProcessorRepository storeRepository; // TODO -> pourquoi pas une interface ? end private final StoreProcessorRepository storeRepository; // TODO -> pourquoi pas une interface ? end
private ProtocolRepository protocolRepository; private ProtocolRepository protocolRepository;

View File

@ -8,7 +8,6 @@ import lightcontainer.interfaces.MulticastSPR;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Collection; import java.util.Collection;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator;
import java.util.Set; import java.util.Set;
// TODO : C'est genre un ClientHandlerManager quoi hein, normal qu'il fasse blinder de chose ;) // TODO : C'est genre un ClientHandlerManager quoi hein, normal qu'il fasse blinder de chose ;)

View File

@ -1,7 +1,5 @@
package lightcontainer.storage; package lightcontainer.storage;
import lightcontainer.utils.Log;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;

View File

@ -1,7 +1,6 @@
package lightcontainer.storage; package lightcontainer.storage;
import lightcontainer.utils.BCryptHasher; import lightcontainer.utils.BCryptHasher;
import lightcontainer.utils.Log;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;

View File

@ -3,7 +3,8 @@ package lightcontainer.utils;
import javax.crypto.*; import javax.crypto.*;
import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec; import javax.crypto.spec.SecretKeySpec;
import java.io.*; import java.io.InputStream;
import java.io.OutputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.security.*; import java.security.*;
import java.util.Base64; import java.util.Base64;

View File

@ -3,12 +3,7 @@ package lightcontainer.utils;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.InputStream; 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.security.MessageDigest;
import java.util.Base64;
/** /**
* SHA 256 Hashing and borrowing Class [DO NOT EDIT] * SHA 256 Hashing and borrowing Class [DO NOT EDIT]

View File

@ -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":[]}]} {
"unicast_port": 8000,
"multicast_ip": "224.66.66.1",
"multicast_port": 15502,
"network_interface": "Mon interface réseau",
"tls": true,
"storagePath": "Chemin vers le dossier FFE",
"users": [
]
}

View File

@ -3,9 +3,6 @@
*/ */
package lightcontainer; package lightcontainer;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class AppTest { class AppTest {
// @Test void appHasAGreeting() { // @Test void appHasAGreeting() {
// App classUnderTest = new App(); // App classUnderTest = new App();

View File

@ -3,8 +3,6 @@ package lightcontainer.protocol.rules.reader;
import lightcontainer.protocol.ProtocolReader; import lightcontainer.protocol.ProtocolReader;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class HelloRuleTest { class HelloRuleTest {
@Test @Test

View File

@ -1,11 +1,7 @@
package lightcontainer.protocol.rules.writer; package lightcontainer.protocol.rules.writer;
import lightcontainer.protocol.ProtocolWriter;
import lightcontainer.protocol.rules.reader.SignoutRule;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class SignoutRuleTest { class SignoutRuleTest {
@Test @Test

View File

@ -1,13 +1,5 @@
package lightcontainer.storage; 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 { public class JsonAdapterTests {
/* /*
@Test @Test

View File

@ -1,17 +1,5 @@
package lightcontainer.storage; 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 { public class RepositoryTests {
/* /*