Begin test update
This commit is contained in:
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
import com.mattrixwv.cipherstream.aspect.CipherStreamLoggingAspect;
|
||||
import com.mattrixwv.cipherstream.combination.ADFGVX;
|
||||
import com.mattrixwv.cipherstream.utils.CipherInfoUtil;
|
||||
import com.mattrixwv.cipherstream.utils.CipherParameterUtil;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -19,10 +20,19 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@RestController
|
||||
@RequestMapping("adfgvx")
|
||||
public class AdfgvxCipherController{
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.ADFGVX_CIPHER_NAME, CipherInfoUtil.ADFGVX_CIPHER_DESCRIPTION);
|
||||
}
|
||||
|
||||
@GetMapping("/encode")
|
||||
public ObjectNode encodeAdfgvx(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "ADFGVX");
|
||||
log.info("Encoding ADFGVX");
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
|
||||
|
||||
CipherParameterUtil.verifySquareKeyword(cipherParams);
|
||||
@@ -45,8 +55,8 @@ public class AdfgvxCipherController{
|
||||
|
||||
@GetMapping("/decode")
|
||||
public ObjectNode decodeAdfgvx(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "ADFGVX");
|
||||
log.info("Decoding ADFGVX");
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
|
||||
|
||||
CipherParameterUtil.verifySquareKeyword(cipherParams);
|
||||
|
||||
Reference in New Issue
Block a user