Skip to content

Commit 385855a

Browse files
committed
test TSimbaFile.FileReadBytes for byte reading when hasing files
1 parent 3e07f1b commit 385855a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/simba.hash.pas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interface
1111

1212
uses
1313
Classes, SysUtils,
14-
simba.base;
14+
simba.base, simba.fs;
1515

1616
type
1717
{$SCOPEDENUMS ON}
@@ -63,10 +63,10 @@ function HashString(Algo: EHashAlgo; const S: String): String;
6363

6464
function HashFile(Algo: EHashAlgo; const FileName: String): String;
6565
var
66-
Bytes: TBytes;
66+
Bytes: TByteArray;
6767
begin
6868
try
69-
Bytes := GetFileContents(FileName);
69+
Bytes := TSimbaFile.FileReadBytes((FileName);
7070
except
7171
end;
7272

0 commit comments

Comments
 (0)