Update cipher descriptions
This commit is contained in:
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -20,20 +22,27 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/columnar")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class ColumnarCipherController{
|
||||
@Value("${cipher.poly.columnar.name}")
|
||||
private String columnarName;
|
||||
@Value("${cipher.poly.columnar.description}")
|
||||
private String columnarDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.COLUMNAR_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.COLUMNAR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
||||
log.info("Getting info for {}", columnarName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.COLUMNAR_CIPHER_NAME, CipherInfoUtil.COLUMNAR_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(columnarName, columnarDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeColumnar(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.COLUMNAR_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.COLUMNAR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
||||
log.info("Encoding {}", columnarName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class ColumnarCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeColumnar(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.COLUMNAR_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.COLUMNAR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, columnarName);
|
||||
log.info("Decoding {}", columnarName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
Reference in New Issue
Block a user