Nouvelles Regex : CLIENT_SAVE_FILE validée
This commit is contained in:
parent
be133a55dc
commit
5a909b65aa
@ -3,6 +3,7 @@ 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.AES_GCM;
|
import lightcontainer.utils.AES_GCM;
|
||||||
@ -13,13 +14,16 @@ import lightcontainer.utils.ShaHasher;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
|
import static lightcontainer.protocol.StandardizedDefinitions.CLIENT_SAVE_FILE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Règle permettant de sauvegarder un fichier sur le SBE.
|
* Règle permettant de sauvegarder un fichier sur le SBE.
|
||||||
* Celui-ci va chiffre le contenu du fichier à l'aide de AES.
|
* Celui-ci va chiffre le contenu du fichier à l'aide de AES.
|
||||||
*/
|
*/
|
||||||
public class SavefileRule extends ProtocolReader {
|
public class SavefileRule extends ProtocolReader {
|
||||||
// Constants
|
// 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";
|
private static final String NAME = "SAVEFILE";
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"name": "test.txt",
|
"name": "test.txt",
|
||||||
"fileNameSalt": "LvFNF7uz324NgsISSpUbwg==",
|
"fileNameSalt": "4DMHDs7+7lS8iw/SZYsdbA==",
|
||||||
"size": 301,
|
"size": 301,
|
||||||
"iv": "lGvyIzgGMiaiHeGwIaCESg==",
|
"iv": "Yuq6QN1WYFm7DZzO+svKGw==",
|
||||||
"storage": [
|
"storage": [
|
||||||
"lightcontainerSB01"
|
"lightcontainerSB01"
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user