Updated more tests
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.polysubstitution.Trifid;
|
||||
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/trifid")
|
||||
public class TrifidCipherController{
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.TRIFID_CIPHER_NAME, CipherInfoUtil.TRIFID_CIPHER_DESCRIPTION);
|
||||
}
|
||||
|
||||
@GetMapping("/encode")
|
||||
public ObjectNode encodeTrifid(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "Trifid");
|
||||
log.info("Encoding Trifid");
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyTrifidParams(cipherParams);
|
||||
@@ -46,8 +56,8 @@ public class TrifidCipherController{
|
||||
|
||||
@GetMapping("/decode")
|
||||
public ObjectNode decodeTrifid(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "Trifid");
|
||||
log.info("Decoding Trifid");
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyTrifidParams(cipherParams);
|
||||
|
||||
Reference in New Issue
Block a user