Page 1 of 1

Argon2 for Delphi 7.

Posted: Wed Nov 26, 2025 12:34 am
by ONiX
var
Argon2: TArgon2DX;
PasswordHash: string;
begin
Argon2 := TArgon2DX.Create(nil);
try
Argon2.MemoryCost := 65536; // 64 MiB
Argon2.TimeCost := 3; // 3 iterations
Argon2.Parallelism := 4; // 4 threads

PasswordHash := Argon2.HashPassword('mypassword');
if Argon2.VerifyPassword('mypassword', PasswordHash) then
ShowMessage('Password verified!');
finally
Argon2.Free;
end;
end;