【问题标题】:How to encrypt post parameters in Inno Setup如何在 Inno Setup 中加密 post 参数
【发布时间】:2017-01-03 06:26:10
【问题描述】:

我必须在安装时将一些用户输入的动态数据发布到我的服务器。我可以成功发布数据。但是为了安全地发布数据,我必须在发布时加密数据。我不知道该怎么做。。

这是我的代码,

procedure CurStepChanged(CurStep: TSetupStep);
var
  WinHttpReq: Variant;
begin
  if CurStep = ssInstall then
  begin
    if AutoCheckRadioButton.Checked = True then
    begin
      WinHttpReq := CreateOleObject('WinHttp.WinHttpRequest.5.1');
      WinHttpReq.Open('POST', '<web_server>', false);
      WinHttpReq.SetRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
      WinHttpReq.Send('<need to encrypt data>');
      { WinHttpReq.ResponseText will hold the server response }
    end;
  end;
end;

提前感谢您的帮助

【问题讨论】:

  • 如果您的 Web 服务器支持 HTTPS 并且 URL 使用 https 协议,则 OLE 对象应自动为您处理。这可确保数据在从客户端到您的服务器的途中被加密。

标签: encryption inno-setup winhttprequest


【解决方案1】:

只需使用 HTTPS URL,例如:

https://www.example.com/

加密自动发生。

【讨论】:

  • 我的回答对你有帮助吗?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-08-22
  • 1970-01-01
相关资源
最近更新 更多