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.monosubstitution.Vigenere;
|
||||
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("/cipherStream/vigenere")
|
||||
public class VigenereCipherController{
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.VIGENERE_CIPHER_NAME, CipherInfoUtil.VIGENERE_CIPHER_DESCRIPTION);
|
||||
}
|
||||
|
||||
@GetMapping("/encode")
|
||||
public ObjectNode encodeVigenere(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "Vigenere");
|
||||
log.info("Encoding Vigenere");
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -44,8 +54,8 @@ public class VigenereCipherController{
|
||||
|
||||
@GetMapping("/decode")
|
||||
public ObjectNode decodeVigenere(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "Vigenere");
|
||||
log.info("Decoding Vigenere");
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
Reference in New Issue
Block a user