Update to add more properties
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.combination;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class AdfgvxCipherController{
|
||||
private String adfgvxName;
|
||||
@Value("${cipher.combination.adfgvx.description}")
|
||||
private String adfgvxDescription;
|
||||
@Value("${cipher.combination.adfgvx.explanation}")
|
||||
private List<String> adfgvxExplanation;
|
||||
@Value("${cipher.combination.adfgvx.facts}")
|
||||
private List<String> adfgvxFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class AdfgvxCipherController{
|
||||
log.info("Getting info for {}", adfgvxName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(adfgvxName, adfgvxDescription);
|
||||
return CipherInfoUtil.buildInfoNode(adfgvxName, adfgvxDescription, adfgvxExplanation, adfgvxFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.combination;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class AdfgxCipherController{
|
||||
private String adfgxName;
|
||||
@Value("${cipher.combination.adfgx.description}")
|
||||
private String adfgxDescription;
|
||||
@Value("${cipher.combination.adfgx.explanation}")
|
||||
private List<String> adfgxExplanation;
|
||||
@Value("${cipher.combination.adfgx.facts}")
|
||||
private List<String> adfgxFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class AdfgxCipherController{
|
||||
log.info("Getting info for {}", adfgxName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(adfgxName, adfgxDescription);
|
||||
return CipherInfoUtil.buildInfoNode(adfgxName, adfgxDescription, adfgxExplanation, adfgxFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class AffineCipherController{
|
||||
private String affineName;
|
||||
@Value("${cipher.mono.affine.description}")
|
||||
private String affineDescription;
|
||||
@Value("${cipher.mono.affine.explanation}")
|
||||
private List<String> affineExplanation;
|
||||
@Value("${cipher.mono.affine.facts}")
|
||||
private List<String> affineFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class AffineCipherController{
|
||||
log.info("Getting info for {}", affineName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(affineName, affineDescription);
|
||||
return CipherInfoUtil.buildInfoNode(affineName, affineDescription, affineExplanation, affineFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class AtbashCipherController{
|
||||
private String atbashName;
|
||||
@Value("${cipher.mono.atbash.description}")
|
||||
private String atbashDescription;
|
||||
@Value("${cipher.mono.atbash.explanation}")
|
||||
private List<String> atbashExplanation;
|
||||
@Value("${cipher.mono.atbash.facts}")
|
||||
private List<String> atbashFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class AtbashCipherController{
|
||||
log.info("Getting info for {}", atbashName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(atbashName, atbashDescription);
|
||||
return CipherInfoUtil.buildInfoNode(atbashName, atbashDescription, atbashExplanation, atbashFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class AutokeyCipherController{
|
||||
private String autokeyName;
|
||||
@Value("${cipher.mono.autokey.description}")
|
||||
private String autokeyDescription;
|
||||
@Value("${cipher.mono.autokey.explanation}")
|
||||
private List<String> autokeyExplanation;
|
||||
@Value("${cipher.mono.autokey.facts}")
|
||||
private List<String> autokeyFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class AutokeyCipherController{
|
||||
log.info("Getting info for {}", autokeyName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(autokeyName, autokeyDescription);
|
||||
return CipherInfoUtil.buildInfoNode(autokeyName, autokeyDescription, autokeyExplanation, autokeyFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class BaconianCipherController{
|
||||
private String baconianName;
|
||||
@Value("${cipher.mono.baconian.description}")
|
||||
private String baconianDescription;
|
||||
@Value("${cipher.mono.baconian.explanation}")
|
||||
private List<String> baconianExplanation;
|
||||
@Value("${cipher.mono.baconian.facts}")
|
||||
private List<String> baconianFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class BaconianCipherController{
|
||||
log.info("Getting info for {}", baconianName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(baconianName, baconianDescription);
|
||||
return CipherInfoUtil.buildInfoNode(baconianName, baconianDescription, baconianExplanation, baconianFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class BaseXCipherController{
|
||||
private String baseXName;
|
||||
@Value("${cipher.mono.basex.description}")
|
||||
private String baseXDescription;
|
||||
@Value("${cipher.mono.baseX.explanation}")
|
||||
private List<String> baseXExplanation;
|
||||
@Value("${cipher.mono.baseX.facts}")
|
||||
private List<String> baseXFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class BaseXCipherController{
|
||||
log.info("Getting info for {}", baseXName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(baseXName, baseXDescription);
|
||||
return CipherInfoUtil.buildInfoNode(baseXName, baseXDescription, baseXExplanation, baseXFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class BeaufortCipherController{
|
||||
private String beaufortName;
|
||||
@Value("${cipher.mono.beaufort.description}")
|
||||
private String beaufortDescription;
|
||||
@Value("${cipher.mono.beaufort.explanation}")
|
||||
private List<String> beaufortExplanation;
|
||||
@Value("${cipher.mono.beaufort.facts}")
|
||||
private List<String> beaufortFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class BeaufortCipherController{
|
||||
log.info("Getting info for {}", beaufortName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(beaufortName, beaufortDescription);
|
||||
return CipherInfoUtil.buildInfoNode(beaufortName, beaufortDescription, beaufortExplanation, beaufortFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class CaesarCipherController{
|
||||
private String caesarName;
|
||||
@Value("${cipher.mono.caesar.description}")
|
||||
private String caesarDescription;
|
||||
@Value("${cipher.mono.caesar.explanation}")
|
||||
private List<String> caesarExplanation;
|
||||
@Value("${cipher.mono.caesar.facts}")
|
||||
private List<String> caesarFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class CaesarCipherController{
|
||||
log.info("Getting info for {}", caesarName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(caesarName, caesarDescription);
|
||||
return CipherInfoUtil.buildInfoNode(caesarName, caesarDescription, caesarExplanation, caesarFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class OneTimePadCipherController{
|
||||
private String oneTimePadName;
|
||||
@Value("${cipher.mono.onetimepad.description}")
|
||||
private String oneTimePadDescription;
|
||||
@Value("${cipher.mono.oneTimePad.explanation}")
|
||||
private List<String> oneTimePadExplanation;
|
||||
@Value("${cipher.mono.oneTimePad.facts}")
|
||||
private List<String> oneTimePadFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class OneTimePadCipherController{
|
||||
log.info("Getting info for {}", oneTimePadName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(oneTimePadName, oneTimePadDescription);
|
||||
return CipherInfoUtil.buildInfoNode(oneTimePadName, oneTimePadDescription, oneTimePadExplanation, oneTimePadFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class PortaCipherController{
|
||||
private String portaName;
|
||||
@Value("${cipher.mono.porta.description}")
|
||||
private String portaDescription;
|
||||
@Value("${cipher.mono.porta.explanation}")
|
||||
private List<String> portaExplanation;
|
||||
@Value("${cipher.mono.porta.facts}")
|
||||
private List<String> portaFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class PortaCipherController{
|
||||
log.info("Getting info for {}", portaName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(portaName, portaDescription);
|
||||
return CipherInfoUtil.buildInfoNode(portaName, portaDescription, portaExplanation, portaFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class SubstitutionCipherController{
|
||||
private String substitutionName;
|
||||
@Value("${cipher.mono.substitution.description}")
|
||||
private String substitutionDescription;
|
||||
@Value("${cipher.mono.substitution.explanation}")
|
||||
private List<String> substitutionExplanation;
|
||||
@Value("${cipher.mono.substitution.facts}")
|
||||
private List<String> substitutionFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class SubstitutionCipherController{
|
||||
log.info("Getting info for {}", substitutionName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(substitutionName, substitutionDescription);
|
||||
return CipherInfoUtil.buildInfoNode(substitutionName, substitutionDescription, substitutionExplanation, substitutionFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.monosubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class VigenereCipherController{
|
||||
private String vigenereName;
|
||||
@Value("${cipher.mono.vigenere.description}")
|
||||
private String vigenereDescription;
|
||||
@Value("${cipher.mono.vigenere.explanation}")
|
||||
private List<String> vigenereExplanation;
|
||||
@Value("${cipher.mono.vigenere.facts}")
|
||||
private List<String> vigenereFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class VigenereCipherController{
|
||||
log.info("Getting info for {}", vigenereName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(vigenereName, vigenereDescription);
|
||||
return CipherInfoUtil.buildInfoNode(vigenereName, vigenereDescription, vigenereExplanation, vigenereFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class BifidCipherController{
|
||||
private String bifidName;
|
||||
@Value("${cipher.poly.bifid.description}")
|
||||
private String bifidDescription;
|
||||
@Value("${cipher.poly.bifid.explanation}")
|
||||
private List<String> bifidExplanation;
|
||||
@Value("${cipher.poly.bifid.facts}")
|
||||
private List<String> bifidFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class BifidCipherController{
|
||||
log.info("Getting info for {}", bifidName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(bifidName, bifidDescription);
|
||||
return CipherInfoUtil.buildInfoNode(bifidName, bifidDescription, bifidExplanation, bifidFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class ColumnarCipherController{
|
||||
private String columnarName;
|
||||
@Value("${cipher.poly.columnar.description}")
|
||||
private String columnarDescription;
|
||||
@Value("${cipher.poly.columnar.explanation}")
|
||||
private List<String> columnarExplanation;
|
||||
@Value("${cipher.poly.columnar.facts}")
|
||||
private List<String> columnarFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class ColumnarCipherController{
|
||||
log.info("Getting info for {}", columnarName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(columnarName, columnarDescription);
|
||||
return CipherInfoUtil.buildInfoNode(columnarName, columnarDescription, columnarExplanation, columnarFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -30,6 +32,10 @@ public class HillCipherController{
|
||||
private String hillName;
|
||||
@Value("${cipher.poly.hill.description}")
|
||||
private String hillDescription;
|
||||
@Value("${cipher.poly.hill.explanation}")
|
||||
private List<String> hillExplanation;
|
||||
@Value("${cipher.poly.hill.facts}")
|
||||
private List<String> hillFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -38,7 +44,7 @@ public class HillCipherController{
|
||||
log.info("Getting info for {}", hillName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(hillName, hillDescription);
|
||||
return CipherInfoUtil.buildInfoNode(hillName, hillDescription, hillExplanation, hillFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class MorseCodeController{
|
||||
private String morseName;
|
||||
@Value("${cipher.poly.morse.description}")
|
||||
private String morseDescription;
|
||||
@Value("${cipher.poly.morse.explanation}")
|
||||
private List<String> morseExplanation;
|
||||
@Value("${cipher.poly.morse.facts}")
|
||||
private List<String> morseFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class MorseCodeController{
|
||||
log.info("Getting info for {}", morseName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(morseName, morseDescription);
|
||||
return CipherInfoUtil.buildInfoNode(morseName, morseDescription, morseExplanation, morseFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class PlayfairCipherController{
|
||||
private String playfairName;
|
||||
@Value("${cipher.poly.playfair.description}")
|
||||
private String playfairDescription;
|
||||
@Value("${cipher.poly.playfair.explanation}")
|
||||
private List<String> playfairExplanation;
|
||||
@Value("${cipher.poly.playfair.facts}")
|
||||
private List<String> playfairFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class PlayfairCipherController{
|
||||
log.info("Getting info for {}", playfairName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(playfairName, playfairDescription);
|
||||
return CipherInfoUtil.buildInfoNode(playfairName, playfairDescription, playfairExplanation, playfairFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class PolybiusSquareController{
|
||||
private String polybiusName;
|
||||
@Value("${cipher.poly.polybius.description}")
|
||||
private String polybiusDescription;
|
||||
@Value("${cipher.poly.polybius.explanation}")
|
||||
private List<String> polybiusExplanation;
|
||||
@Value("${cipher.poly.polybius.facts}")
|
||||
private List<String> polybiusFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class PolybiusSquareController{
|
||||
log.info("Getting info for {}", polybiusName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(polybiusName, polybiusDescription);
|
||||
return CipherInfoUtil.buildInfoNode(polybiusName, polybiusDescription, polybiusExplanation, polybiusFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class RailFenceController{
|
||||
private String railFenceName;
|
||||
@Value("${cipher.poly.railfence.description}")
|
||||
private String railFenceDescription;
|
||||
@Value("${cipher.poly.railfence.explanation}")
|
||||
private List<String> railFenceExplanation;
|
||||
@Value("${cipher.poly.railfence.facts}")
|
||||
private List<String> railFenceFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class RailFenceController{
|
||||
log.info("Getting info for {}", railFenceName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(railFenceName, railFenceDescription);
|
||||
return CipherInfoUtil.buildInfoNode(railFenceName, railFenceDescription, railFenceExplanation, railFenceFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.controller.polysubstitution;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.MDC;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
@@ -28,6 +30,10 @@ public class TrifidCipherController{
|
||||
private String trifidName;
|
||||
@Value("${cipher.poly.trifid.description}")
|
||||
private String trifidDescription;
|
||||
@Value("${cipher.poly.trifid.explanation}")
|
||||
private List<String> trifidExplanation;
|
||||
@Value("${cipher.poly.trifid.facts}")
|
||||
private List<String> trifidFacts;
|
||||
|
||||
|
||||
@GetMapping
|
||||
@@ -36,7 +42,7 @@ public class TrifidCipherController{
|
||||
log.info("Getting info for {}", trifidName);
|
||||
|
||||
|
||||
return CipherInfoUtil.buildInfoNode(trifidName, trifidDescription);
|
||||
return CipherInfoUtil.buildInfoNode(trifidName, trifidDescription, trifidExplanation, trifidFacts);
|
||||
}
|
||||
|
||||
@PostMapping("/encode")
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.mattrixwv.cipherstream.utils;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||
|
||||
@@ -15,14 +17,18 @@ public class CipherInfoUtil{
|
||||
//Parameters
|
||||
public static final String CIPHER_NAME = "name";
|
||||
public static final String CIPHER_DESCRIPTION = "description";
|
||||
public static final String CIPHER_EXPLANATION = "explanation";
|
||||
public static final String CIPHER_FACTS = "facts";
|
||||
|
||||
|
||||
public static ObjectNode buildInfoNode(String name, String description){
|
||||
public static ObjectNode buildInfoNode(String name, String description, List<String> explanation, List<String> facts){
|
||||
ObjectNode infoNode = mapper.createObjectNode();
|
||||
|
||||
|
||||
infoNode.put(CIPHER_NAME, name);
|
||||
infoNode.put(CIPHER_DESCRIPTION, description);
|
||||
infoNode.set(CIPHER_EXPLANATION, mapper.valueToTree(explanation));
|
||||
infoNode.set(CIPHER_FACTS, mapper.valueToTree(facts));
|
||||
|
||||
|
||||
return infoNode;
|
||||
|
||||
Reference in New Issue
Block a user