unit ddjb2_generic;

//  Workaround for passing the djb2 function as a generic parameter.

{$MODE FPC}
{$MODESWITCH DEFAULTPARAMETERS}
{$MODESWITCH OUT}
{$MODESWITCH RESULT}

interface

uses
  ddjb2;

type
TDjb2Hash = object
  procedure Init; inline;
  procedure Done; inline;
  function Get(Key: PAnsiChar; Size: SizeUInt): UInt32; inline;
end;

implementation

procedure TDjb2Hash.Init;
begin
end;

procedure TDjb2Hash.Done;
begin
end;

function TDjb2Hash.Get(Key: PAnsiChar; Size: SizeUInt): UInt32;
begin
  Exit(GetDjb2(Key, Size));
end;

end.
