Skip to content

Commit f2a7a2d

Browse files
committed
Fixed compilation error by changing the implementation to that of the development branch.
1 parent 8fdf8c5 commit f2a7a2d

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

Demos/Hash_FMX/MainForm.pas

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,22 @@ procedure TFormMain.ComboBoxHashFunctionChange(Sender: TObject);
362362
end;
363363

364364
function TFormMain.IsSaltablePasswordHash(HashClass: TDECHashClass): Boolean;
365+
var
366+
Hash : TDECHash;
365367
begin
366-
Result := (HashClass.IsPasswordHash and
367-
(TDECPasswordHashClass(HashClass).MaxSaltLength > 0));
368+
Result := false;
369+
370+
if HashClass.IsPasswordHash then
371+
begin
372+
Hash := HashClass.Create;
373+
374+
try
375+
if Supports(Hash.ClassType, IDECHashPassword) then
376+
Result := (TDECPasswordHash(Hash).MaxSaltLength > 0);
377+
finally
378+
Hash.Free;
379+
end;
380+
end;
368381
end;
369382

370383
procedure TFormMain.EditCostChange(Sender: TObject);

0 commit comments

Comments
 (0)