Delphi ActiveX
Delphi ActiveX
Example: SecureString.HashVal method
Demonstrates theHashVal 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
success: Integer;
str: TChilkatSecureString;
encodedHash: WideString;
begin
success := 0;
str := TChilkatSecureString.Create(Self);
str.MaintainHash := 'sha256';
str.Append('Hello World');
encodedHash := str.HashVal('base64');
Memo1.Lines.Add(encodedHash);
end;