I have to post some user entered dynamic data to my server while installing. I can post the data successfully. But to post the data securely i have to encrypt the data while posting. I don't know how to do this..
Here is my code,
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;
Thanks in advance for your help
Just use an HTTPS URL, like:
The encryption happens automatically.