Sample code for 30+ languages & platforms
Delphi ActiveX

Example: SecureString.HashVal method

Demonstrates the HashVal method.

Chilkat Delphi ActiveX Downloads

Delphi ActiveX
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;