public ActionResult Encrypt(string plainText) { ViewBag.PlainText = plainText; byte[] encryptedBytes = AESCrypto.AES_EncryptString(plainText); string encryptedHexString = CryptoHelper.ConvertByteArrayToHexString(encryptedBytes); ViewBag.EncryptedHexString = encryptedHexString + "&HMacToken=" + GenerateHMac(encryptedHexString); return(View("Index")); }