public ActionResult EncryptData() { var model = new EncryptedDataViewModel() { IsEnabled = !string.IsNullOrEmpty(_configurationClient.GetConfiguration().EncryptionKey) }; return(View("EncryptData", model)); }
public ActionResult EncryptData(string variableValue) { string encryptedValue = ""; if (!string.IsNullOrEmpty(variableValue)) { encryptedValue = _encryptor.Encrypt(variableValue); } var model = new EncryptedDataViewModel() { IsEnabled = true, PlainValue = variableValue ?? string.Empty, EncryptedValue = encryptedValue }; return(View("EncryptData", model)); }