Update cipher descriptions
This commit is contained in:
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.combination;
|
||||
|
||||
|
||||
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("/adfgvx")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class AdfgvxCipherController{
|
||||
@Value("${cipher.combination.adfgvx.name}")
|
||||
private String adfgvxName;
|
||||
@Value("${cipher.combination.adfgvx.description}")
|
||||
private String adfgvxDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
||||
log.info("Getting info for {}", adfgvxName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.ADFGVX_CIPHER_NAME, CipherInfoUtil.ADFGVX_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(adfgvxName, adfgvxDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeAdfgvx(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
||||
log.info("Encoding {}", adfgvxName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifySquareKeyword(cipherParams);
|
||||
@@ -56,8 +65,8 @@ public class AdfgvxCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeAdfgvx(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.ADFGVX_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgvxName);
|
||||
log.info("Decoding {}", adfgvxName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifySquareKeyword(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.combination;
|
||||
|
||||
|
||||
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("/adfgx")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class AdfgxCipherController{
|
||||
@Value("${cipher.combination.adfgvx.name}")
|
||||
private String adfgxName;
|
||||
@Value("${cipher.combination.adfgvx.description}")
|
||||
private String adfgxDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGX_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.ADFGX_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
||||
log.info("Getting info for {}", adfgxName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.ADFGX_CIPHER_NAME, CipherInfoUtil.ADFGX_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(adfgxName, adfgxDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeAdfgx(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGX_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.ADFGX_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
||||
log.info("Encoding {}", adfgxName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifySquareKeyword(cipherParams);
|
||||
@@ -56,8 +65,8 @@ public class AdfgxCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeAdfgx(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ADFGX_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.ADFGX_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, adfgxName);
|
||||
log.info("Decoding {}", adfgxName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifySquareKeyword(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/affine")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class AffineCipherController{
|
||||
@Value("${cipher.mono.affine.name}")
|
||||
private String affineName;
|
||||
@Value("${cipher.mono.affine.description}")
|
||||
private String affineDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.AFFINE_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.AFFINE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
||||
log.info("Getting info for {}", affineName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.AFFINE_CIPHER_NAME, CipherInfoUtil.AFFINE_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(affineName, affineDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeAffine(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.AFFINE_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.AFFINE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
||||
log.info("Encoding {}", affineName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyAffineParams(cipherParams);
|
||||
@@ -56,8 +65,8 @@ public class AffineCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeAffine(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.AFFINE_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.AFFINE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, affineName);
|
||||
log.info("Decoding {}", affineName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyAffineParams(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/atbash")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class AtbashCipherController{
|
||||
@Value("${cipher.mono.atbash.name}")
|
||||
private String atbashName;
|
||||
@Value("${cipher.mono.atbash.description}")
|
||||
private String atbashDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ATBASH_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.ATBASH_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
||||
log.info("Getting info for {}", atbashName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.ATBASH_CIPHER_NAME, CipherInfoUtil.ATBASH_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(atbashName, atbashDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeAtbash(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ATBASH_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.ATBASH_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
||||
log.info("Encoding {}", atbashName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyAtbashParams(cipherParams);
|
||||
@@ -54,8 +63,8 @@ public class AtbashCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeAtbash(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ATBASH_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.ATBASH_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, atbashName);
|
||||
log.info("Decoding {}", atbashName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyAtbashParams(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/autokey")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class AutokeyCipherController{
|
||||
@Value("${cipher.mono.autokey.name}")
|
||||
private String autokeyName;
|
||||
@Value("${cipher.mono.autokey.description}")
|
||||
private String autokeyDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.AUTOKEY_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.AUTOKEY_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
||||
log.info("Getting info for {}", autokeyName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.AUTOKEY_CIPHER_NAME, CipherInfoUtil.AUTOKEY_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(autokeyName, autokeyDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeAutokey(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.AUTOKEY_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.AUTOKEY_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
||||
log.info("Encoding {}", autokeyName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class AutokeyCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeAutokey(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.AUTOKEY_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.AUTOKEY_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, autokeyName);
|
||||
log.info("Decoding {}", autokeyName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/baconian")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class BaconianCipherController{
|
||||
@Value("${cipher.mono.baconian.name}")
|
||||
private String baconianName;
|
||||
@Value("${cipher.mono.baconian.description}")
|
||||
private String baconianDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BACONIAN_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.BACONIAN_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
||||
log.info("Getting info for {}", baconianName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.BACONIAN_CIPHER_NAME, CipherInfoUtil.BACONIAN_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(baconianName, baconianDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeBaconian(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "Baconian");
|
||||
log.info("Encoding {}", CipherInfoUtil.BACONIAN_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
||||
log.info("Encoding {}", baconianName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyBaconianParams(cipherParams);
|
||||
@@ -52,8 +61,8 @@ public class BaconianCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeBaconian(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, "Baconian");
|
||||
log.info("Decoding {}", CipherInfoUtil.BACONIAN_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baconianName);
|
||||
log.info("Decoding {}", baconianName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyBaconianParams(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/basex")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class BaseXCipherController{
|
||||
@Value("${cipher.mono.basex.name}")
|
||||
private String baseXName;
|
||||
@Value("${cipher.mono.basex.description}")
|
||||
private String baseXDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BASE_X_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.BASE_X_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
||||
log.info("Getting info for {}", baseXName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.BASE_X_CIPHER_NAME, CipherInfoUtil.BASE_X_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(baseXName, baseXDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeBaseX(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BASE_X_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.BASE_X_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
||||
log.info("Encoding {}", baseXName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyBaseXParams(cipherParams);
|
||||
@@ -52,8 +61,8 @@ public class BaseXCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeBaseX(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BASE_X_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.BASE_X_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, baseXName);
|
||||
log.info("Decoding {}", baseXName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyBaseXParams(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/beaufort")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class BeaufortCipherController{
|
||||
@Value("${cipher.mono.beaufort.name}")
|
||||
private String beaufortName;
|
||||
@Value("${cipher.mono.beaufort.description}")
|
||||
private String beaufortDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BEAUFORT_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.BEAUFORT_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
||||
log.info("Getting info for {}", beaufortName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.BEAUFORT_CIPHER_NAME, CipherInfoUtil.BEAUFORT_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(beaufortName, beaufortDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeBeaufort(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BEAUFORT_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.BEAUFORT_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
||||
log.info("Encoding {}", beaufortName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class BeaufortCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeBeaufort(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BEAUFORT_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.BEAUFORT_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, beaufortName);
|
||||
log.info("Decoding {}", beaufortName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/caesar")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class CaesarCipherController{
|
||||
@Value("${cipher.mono.caesar.name}")
|
||||
private String caesarName;
|
||||
@Value("${cipher.mono.caesar.description}")
|
||||
private String caesarDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.CAESAR_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.CAESAR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
||||
log.info("Getting info for {}", caesarName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.CAESAR_CIPHER_NAME, CipherInfoUtil.CAESAR_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(caesarName, caesarDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeCaesar(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.CAESAR_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.CAESAR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
||||
log.info("Encoding {}", caesarName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyCaesarParams(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class CaesarCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeCaesar(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.CAESAR_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.CAESAR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, caesarName);
|
||||
log.info("Decoding {}", caesarName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyCaesarParams(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/oneTimePad")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class OneTimePadCipherController{
|
||||
@Value("${cipher.mono.onetimepad.name}")
|
||||
private String oneTimePadName;
|
||||
@Value("${cipher.mono.onetimepad.description}")
|
||||
private String oneTimePadDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ONE_TIME_PAD_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.ONE_TIME_PAD_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
||||
log.info("Getting info for {}", oneTimePadName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.ONE_TIME_PAD_CIPHER_NAME, CipherInfoUtil.ONE_TIME_PAD_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(oneTimePadName, oneTimePadDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeOneTimePad(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ONE_TIME_PAD_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.ONE_TIME_PAD_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
||||
log.info("Encoding {}", oneTimePadName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class OneTimePadCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeOneTimePad(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.ONE_TIME_PAD_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.ONE_TIME_PAD_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, oneTimePadName);
|
||||
log.info("Decoding {}", oneTimePadName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/porta")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class PortaCipherController{
|
||||
@Value("${cipher.mono.porta.name}")
|
||||
private String portaName;
|
||||
@Value("${cipher.mono.porta.description}")
|
||||
private String portaDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.PORTA_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.PORTA_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
||||
log.info("Getting info for {}", portaName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.PORTA_CIPHER_NAME, CipherInfoUtil.PORTA_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(portaName, portaDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodePorta(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.PORTA_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.PORTA_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
||||
log.info("Encoding {}", portaName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class PortaCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodePorta(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.PORTA_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.PORTA_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, portaName);
|
||||
log.info("Decoding {}", portaName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/substitution")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class SubstitutionCipherController{
|
||||
@Value("${cipher.mono.substitution.name}")
|
||||
private String substitutionName;
|
||||
@Value("${cipher.mono.substitution.description}")
|
||||
private String substitutionDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.SUBSTITUTION_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.SUBSTITUTION_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
||||
log.info("Getting info for {}", substitutionName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.SUBSTITUTION_CIPHER_NAME, CipherInfoUtil.SUBSTITUTION_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(substitutionName, substitutionDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeSubstitution(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.SUBSTITUTION_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.SUBSTITUTION_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
||||
log.info("Encoding {}", substitutionName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class SubstitutionCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeSubstitution(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.SUBSTITUTION_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.SUBSTITUTION_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, substitutionName);
|
||||
log.info("Decoding {}", substitutionName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
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("/vigenere")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class VigenereCipherController{
|
||||
@Value("${cipher.mono.vigenere.name}")
|
||||
private String vigenereName;
|
||||
@Value("${cipher.mono.vigenere.description}")
|
||||
private String vigenereDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
||||
log.info("Getting info for {}", vigenereName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.VIGENERE_CIPHER_NAME, CipherInfoUtil.VIGENERE_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(vigenereName, vigenereDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeVigenere(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
||||
log.info("Encoding {}", vigenereName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class VigenereCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeVigenere(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.VIGENERE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, vigenereName);
|
||||
log.info("Decoding {}", vigenereName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
@@ -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("/bifid")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class BifidCipherController{
|
||||
@Value("${cipher.poly.bifid.name}")
|
||||
private String bifidName;
|
||||
@Value("${cipher.poly.bifid.description}")
|
||||
private String bifidDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BIFID_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.BIFID_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
||||
log.info("Getting info for {}", bifidName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.BIFID_CIPHER_NAME, CipherInfoUtil.BIFID_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(bifidName, bifidDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeBifid(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BIFID_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.BIFID_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
||||
log.info("Encoding {}", bifidName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class BifidCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeBifid(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.BIFID_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.BIFID_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, bifidName);
|
||||
log.info("Decoding {}", bifidName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
@@ -22,20 +24,27 @@ import lombok.extern.slf4j.Slf4j;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/hill")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class HillCipherController{
|
||||
@Value("${cipher.poly.hill.name}")
|
||||
private String hillName;
|
||||
@Value("${cipher.poly.hill.description}")
|
||||
private String hillDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.HILL_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.HILL_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
||||
log.info("Getting info for {}", hillName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.HILL_CIPHER_NAME, CipherInfoUtil.HILL_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(hillName, hillDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeHill(@RequestBody ObjectNode cipherParams) throws JsonProcessingException{
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.HILL_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.HILL_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
||||
log.info("Encoding {}", hillName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyHillParams(cipherParams);
|
||||
@@ -57,8 +66,8 @@ public class HillCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeHill(@RequestBody ObjectNode cipherParams) throws JsonProcessingException{
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.HILL_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.HILL_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, hillName);
|
||||
log.info("Decoding {}", hillName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyHillParams(cipherParams);
|
||||
|
||||
@@ -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("/morse")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class MorseCodeController{
|
||||
@Value("${cipher.poly.morse.name}")
|
||||
private String morseName;
|
||||
@Value("${cipher.poly.morse.description}")
|
||||
private String morseDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.MORSE_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.MORSE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
||||
log.info("Getting info for {}", morseName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.MORSE_CIPHER_NAME, CipherInfoUtil.MORSE_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(morseName, morseDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeMorse(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.MORSE_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.MORSE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
||||
log.info("Encoding {}", morseName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyMorseParams(cipherParams);
|
||||
@@ -51,8 +60,8 @@ public class MorseCodeController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeMorse(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.MORSE_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.MORSE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, morseName);
|
||||
log.info("Decoding {}", morseName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyMorseParams(cipherParams);
|
||||
|
||||
@@ -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("/playfair")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class PlayfairCipherController{
|
||||
@Value("${cipher.poly.playfair.name}")
|
||||
private String playfairName;
|
||||
@Value("${cipher.poly.playfair.description}")
|
||||
private String playfairDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.PLAYFAIR_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.PLAYFAIR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
||||
log.info("Getting info for {}", playfairName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.PLAYFAIR_CIPHER_NAME, CipherInfoUtil.PLAYFAIR_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(playfairName, playfairDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodePlayfair(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.PLAYFAIR_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.PLAYFAIR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
||||
log.info("Encoding {}", playfairName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class PlayfairCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodePlayfair(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.PLAYFAIR_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.PLAYFAIR_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, playfairName);
|
||||
log.info("Decoding {}", playfairName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyParamsWithKeyword(cipherParams);
|
||||
|
||||
@@ -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("/polybius")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class PolybiusSquareController{
|
||||
@Value("${cipher.poly.polybius.name}")
|
||||
private String polybiusName;
|
||||
@Value("${cipher.poly.polybius.description}")
|
||||
private String polybiusDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.POLYBIUS_SQUARE_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.POLYBIUS_SQUARE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
||||
log.info("Getting info for {}", polybiusName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.POLYBIUS_SQUARE_CIPHER_NAME, CipherInfoUtil.POLYBIUS_SQUARE_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(polybiusName, polybiusDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodePolybius(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.POLYBIUS_SQUARE_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.POLYBIUS_SQUARE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
||||
log.info("Encoding {}", polybiusName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyPolybiusParams(cipherParams);
|
||||
@@ -54,8 +63,8 @@ public class PolybiusSquareController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodePolybius(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.POLYBIUS_SQUARE_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.POLYBIUS_SQUARE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, polybiusName);
|
||||
log.info("Decoding {}", polybiusName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyPolybiusParams(cipherParams);
|
||||
|
||||
@@ -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("/railFence")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class RailFenceController{
|
||||
@Value("${cipher.poly.railfence.name}")
|
||||
private String railFenceName;
|
||||
@Value("${cipher.poly.railfence.description}")
|
||||
private String railFenceDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.RAIL_FENCE_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.RAIL_FENCE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
||||
log.info("Getting info for {}", railFenceName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.RAIL_FENCE_CIPHER_NAME, CipherInfoUtil.RAIL_FENCE_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(railFenceName, railFenceDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeRailFence(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.RAIL_FENCE_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.RAIL_FENCE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
||||
log.info("Encoding {}", railFenceName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyRailFenceParams(cipherParams);
|
||||
@@ -55,8 +64,8 @@ public class RailFenceController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeRailFence(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.RAIL_FENCE_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.RAIL_FENCE_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, railFenceName);
|
||||
log.info("Decoding {}", railFenceName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyRailFenceParams(cipherParams);
|
||||
|
||||
@@ -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("/trifid")
|
||||
@PropertySource("classpath:ciphers.properties")
|
||||
public class TrifidCipherController{
|
||||
@Value("${cipher.poly.trifid.name}")
|
||||
private String trifidName;
|
||||
@Value("${cipher.poly.trifid.description}")
|
||||
private String trifidDescription;
|
||||
|
||||
|
||||
@GetMapping
|
||||
public ObjectNode getCipherInfo(){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
log.info("Getting info for {}", CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
||||
log.info("Getting info for {}", trifidName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.TRIFID_CIPHER_NAME, CipherInfoUtil.TRIFID_CIPHER_DESCRIPTION);
|
||||
return CipherInfoUtil.buildInfoNode(trifidName, trifidDescription);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
public ObjectNode encodeTrifid(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
log.info("Encoding {}", CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
||||
log.info("Encoding {}", trifidName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyTrifidParams(cipherParams);
|
||||
@@ -57,8 +66,8 @@ public class TrifidCipherController{
|
||||
|
||||
@PostMapping("/decode")
|
||||
public ObjectNode decodeTrifid(@RequestBody ObjectNode cipherParams){
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
log.info("Decoding {}", CipherInfoUtil.TRIFID_CIPHER_NAME);
|
||||
MDC.put(CipherStreamLoggingAspect.CIPHER_NAME_LOGGING, trifidName);
|
||||
log.info("Decoding {}", trifidName);
|
||||
|
||||
|
||||
CipherParameterUtil.verifyTrifidParams(cipherParams);
|
||||
|
||||
@@ -17,60 +17,6 @@ public class CipherInfoUtil{
|
||||
public static final String CIPHER_DESCRIPTION = "description";
|
||||
|
||||
|
||||
//Cipher Names
|
||||
//Combination
|
||||
public static final String ADFGVX_CIPHER_NAME = "ADFGVX";
|
||||
public static final String ADFGX_CIPHER_NAME = "ADFGX";
|
||||
//Mono-Substitution
|
||||
public static final String AFFINE_CIPHER_NAME = "Affine";
|
||||
public static final String ATBASH_CIPHER_NAME = "Atbash";
|
||||
public static final String AUTOKEY_CIPHER_NAME = "Autokey";
|
||||
public static final String BACONIAN_CIPHER_NAME = "Baconian";
|
||||
public static final String BASE_X_CIPHER_NAME = "Base X";
|
||||
public static final String BEAUFORT_CIPHER_NAME = "Beaufort";
|
||||
public static final String CAESAR_CIPHER_NAME = "Caesar";
|
||||
public static final String ONE_TIME_PAD_CIPHER_NAME = "One-Time Pad";
|
||||
public static final String PORTA_CIPHER_NAME = "Porta";
|
||||
public static final String SUBSTITUTION_CIPHER_NAME = "Substitution";
|
||||
public static final String VIGENERE_CIPHER_NAME = "Vigenere";
|
||||
//Poly-Substitution
|
||||
public static final String BIFID_CIPHER_NAME = "Bifid";
|
||||
public static final String COLUMNAR_CIPHER_NAME = "Columnar";
|
||||
public static final String HILL_CIPHER_NAME = "Hill";
|
||||
public static final String MORSE_CIPHER_NAME = "Morse";
|
||||
public static final String PLAYFAIR_CIPHER_NAME = "Playfair";
|
||||
public static final String POLYBIUS_SQUARE_CIPHER_NAME = "Polybius Square";
|
||||
public static final String RAIL_FENCE_CIPHER_NAME = "Rail Fence";
|
||||
public static final String TRIFID_CIPHER_NAME = "Trifid Cipher";
|
||||
|
||||
|
||||
//TODO: Cipher descriptions
|
||||
//Combintation
|
||||
public static final String ADFGVX_CIPHER_DESCRIPTION = "ADFGVX Cipher";
|
||||
public static final String ADFGX_CIPHER_DESCRIPTION = "ADFGX Cipher";
|
||||
//Mono-Substitution
|
||||
public static final String AFFINE_CIPHER_DESCRIPTION = "Affine Cipher";
|
||||
public static final String ATBASH_CIPHER_DESCRIPTION = "Atbash Cipher";
|
||||
public static final String AUTOKEY_CIPHER_DESCRIPTION = "Autokey Cipher";
|
||||
public static final String BACONIAN_CIPHER_DESCRIPTION = "Baconian Cipher";
|
||||
public static final String BASE_X_CIPHER_DESCRIPTION = "Base X Cipher";
|
||||
public static final String BEAUFORT_CIPHER_DESCRIPTION = "Beaufort Cipher";
|
||||
public static final String CAESAR_CIPHER_DESCRIPTION = "Caesar Cipher";
|
||||
public static final String ONE_TIME_PAD_CIPHER_DESCRIPTION = "One-Time Pad Cipher";
|
||||
public static final String PORTA_CIPHER_DESCRIPTION = "Porta Cipher";
|
||||
public static final String SUBSTITUTION_CIPHER_DESCRIPTION = "Substitution Cipher";
|
||||
public static final String VIGENERE_CIPHER_DESCRIPTION = "Vigenere Cipher";
|
||||
//Poly-Substitution
|
||||
public static final String BIFID_CIPHER_DESCRIPTION = "Bifid Cipher";
|
||||
public static final String COLUMNAR_CIPHER_DESCRIPTION = "Columnar Cipher";
|
||||
public static final String HILL_CIPHER_DESCRIPTION = "Hill Cipher";
|
||||
public static final String MORSE_CIPHER_DESCRIPTION = "Morse Code";
|
||||
public static final String PLAYFAIR_CIPHER_DESCRIPTION = "Playfair Cipher";
|
||||
public static final String POLYBIUS_SQUARE_CIPHER_DESCRIPTION = "Polybius Square Cipher";
|
||||
public static final String RAIL_FENCE_CIPHER_DESCRIPTION = "Rail Fence Cipher";
|
||||
public static final String TRIFID_CIPHER_DESCRIPTION = "Trifid Cipher";
|
||||
|
||||
|
||||
public static ObjectNode buildInfoNode(String name, String description){
|
||||
ObjectNode infoNode = mapper.createObjectNode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user