Delphi ActiveX
Delphi ActiveX
Example: Http.DownloadHash method
Demonstrates theDownloadHash method.
Chilkat Delphi ActiveX Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;
...
procedure TForm1.Button1Click(Sender: TObject);
var
http: TChilkatHttp;
url: WideString;
encodedHash: WideString;
begin
http := TChilkatHttp.Create(Self);
url := 'https://chilkatdownload.com/11.1.0/chilkat2-python-3.13-x64.zip';
encodedHash := http.DownloadHash(url,'sha256','hex_lower');
if (http.LastMethodSuccess = 0) then
begin
Memo1.Lines.Add(http.LastErrorText);
Exit;
end;
// Expected value: 32583182374888c7761e7c15b998fd1d326c439c704d59380d34599f4be9b63a
Memo1.Lines.Add('sha256 = ' + encodedHash);
end;