Updated more tests

This commit is contained in:
Matthew Ellison
2024-04-08 16:44:38 -04:00
parent 1a93a30b42
commit ff11cd72c3
52 changed files with 1813 additions and 294 deletions

View File

@@ -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.Columnar;
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/columnar")
public class ColumnarCipherController{
@GetMapping
public ObjectNode getCipherInfo(){
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.COLUMNAR_CIPHER_NAME);
log.info("Getting info for {}", CipherInfoUtil.COLUMNAR_CIPHER_NAME);
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.COLUMNAR_CIPHER_NAME, CipherInfoUtil.COLUMNAR_CIPHER_DESCRIPTION);
}
@GetMapping("/encode")
public ObjectNode encodeColumnar(@RequestBody ObjectNode cipherParams){
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "Columnar");
log.info("Encoding Columnar");
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.COLUMNAR_CIPHER_NAME);
log.info("Encoding {}", CipherInfoUtil.COLUMNAR_CIPHER_NAME);
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
@@ -44,8 +54,8 @@ public class ColumnarCipherController{
@GetMapping("/decode")
public ObjectNode decodeColumnar(@RequestBody ObjectNode cipherParams){
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "Columnar");
log.info("Decoding Columnar");
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.COLUMNAR_CIPHER_NAME);
log.info("Decoding {}", CipherInfoUtil.COLUMNAR_CIPHER_NAME);
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);