Update encryption functions to post

This commit is contained in:
Matthew Ellison
2024-04-16 16:08:18 -04:00
parent fcc04b3416
commit 93c631d7e0
20 changed files with 60 additions and 40 deletions

View File

@@ -3,6 +3,7 @@ package com.mattrixwv.cipherstream.controller.polysubstitution;
import org.slf4j.MDC;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -29,7 +30,7 @@ public class TrifidCipherController{
return CipherInfoUtil.buildInfoNode(CipherInfoUtil.TRIFID_CIPHER_NAME, CipherInfoUtil.TRIFID_CIPHER_DESCRIPTION);
}
@GetMapping("/encode")
@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);
@@ -54,7 +55,7 @@ public class TrifidCipherController{
return cipherParams;
}
@GetMapping("/decode")
@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);