kms Api MessageController Post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[HttpPost] | |
public async Task<IActionResult> ReceiveMessage(EncryptionPackage encryptionPackage){ | |
if(encryptionPackage == null || encryptionPackage.CipherText == null || encryptionPackage.EncryptedKey == null){ | |
return BadRequest(); | |
} | |
IDecrypter decrypter = new AESDecrypter(); | |
string plainText = await decrypter.Decrypt(encryptionPackage); | |
Console.WriteLine("Decrypted:" + plainText); | |
return Ok(plainText); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment