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 4cd2e57..b573454 100644 --- a/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java +++ b/app/src/main/java/lightcontainer/protocol/rules/reader/SavefileRule.java @@ -3,6 +3,7 @@ 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.AES_GCM; @@ -13,13 +14,16 @@ import lightcontainer.utils.ShaHasher; import java.io.IOException; import java.io.InputStream; +import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SAVE_FILE; + /** * Règle permettant de sauvegarder un fichier sur le SBE. * Celui-ci va chiffre le contenu du fichier à l'aide de AES. */ public class SavefileRule extends ProtocolReader { // Constants - private static final String PATTERN = "^SAVEFILE ([^ !]{1,20}) ([0-9]{1,10})\r\n$"; + //"^SAVEFILE ([^ !]{1,20}) ([0-9]{1,10})\r\n$" + private static final String PATTERN = CLIENT_SAVE_FILE; private static final String NAME = "SAVEFILE"; diff --git a/app/src/main/resources/appdata.json b/app/src/main/resources/appdata.json index ec60f88..fc861fd 100644 --- a/app/src/main/resources/appdata.json +++ b/app/src/main/resources/appdata.json @@ -13,9 +13,9 @@ "files": [ { "name": "test.txt", - "fileNameSalt": "LvFNF7uz324NgsISSpUbwg==", + "fileNameSalt": "4DMHDs7+7lS8iw/SZYsdbA==", "size": 301, - "iv": "lGvyIzgGMiaiHeGwIaCESg==", + "iv": "Yuq6QN1WYFm7DZzO+svKGw==", "storage": [ "lightcontainerSB01" ]