Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
kms Api MessageController Post
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