Agreed. I have been using delphi and lazarus since the mid 90s, but don't have much experience in the adding of things as you showed above.
My real programming job was in IBM assembler and cobol. Here is what I did step by step for anyone who might want to know:
1. Downloaded HashLib4Pascal from
https://github.com/Xor-el/HashLib4Pascal2. Unzipped it and copied the (sub) folder named HashLib4Pascal into C:\Lazarus\components\
3. Start the Lazarus compiler and click lazarus menu items Packages/Open packages file (.lpk)... and go to
C:\Lazarus\components\HashLib4Pascal\HashLib\src\Packages\FPC\ and double clicked on HashLib4PascalPackage.lpk
4. Clicked the compile button in the window that comes up and when finished, closed out that window.
5. Then go to menu items Project/Project Inspector... and click on Add/New Requirements and select package name HashLib4PascalPackage,
click OK, and close that window.
6. Start a Lazarus project and Add StdCtrls and HlpHashFactory to uses.
7. Here is the code to get the tiger hash of the word Fish:
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, HlpHashFactory;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
function Tigit(data : string): string;
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
function TForm1.Tigit(data : string): string;
begin
Result := THashFactory.TCrypto.CreateTiger_5_192().ComputeString('Fish', TEncoding.UTF8).ToString();
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage( Tigit(''));
end;
end.