FileForums

FileForums (https://fileforums.com/index.php)
-   Conversion Tutorials (https://fileforums.com/forumdisplay.php?f=55)
-   -   Game files integrity check - XHash Library (https://fileforums.com/showthread.php?t=103790)

BLACKFIRE69 03-09-2020 05:52

Game files integrity check - XHash Library
 
5 Attachment(s)
Game files integrity check - XHash Library


What's New:
  • Stable.
  • Faster.
  • Supports both generate and verify checksum procedures.
  • support for multiple algorithms in one hash file (ex: hash_mixed.md5) for verification. (Only for CRC32, MD5, SHA1, SHA256, SHA512)


ChecksumX
Code:

USAGE:
 ChecksumX.exe (generate) (autoclose) (/x=<ExcludeFile>) <Checksum_File> <Algorithm_Index> <Base_Path>

OPTIONS:
 generate  - Generate a checksumfile.
 autoclose - Automatically close when the process is done.
 /x=<file> - Exclude file masks list for generate only.


_
Code:

Algorithm:

CRC32
MD5
SHA1
SHA256
SHA512
SHA512_256
SHA3_256
SHA3_512
BLAKE2_128
BLAKE2_256
BLAKE3_256
HAVAL3_128
HAVAL3_256
RIPEMD_128
RIPEMD_256
TIGER_128
TIGER_192
TIGER2_128
TIGER2_192
MURMURHASH_32
XXHASH_32


BLACKFIRE69 05-09-2020 11:58

XHash Update 1.1v
 
1 Attachment(s)
XHash Update 1.1v

  • Added more Algos.

    - md5
    - sha1
    - sha256
    - sha512

  • Fixed some bugs.

_

Balaji007 05-10-2020 10:15

I am appreciating your work friend. Your tools are pretty cool

Epic Titan 69 20-02-2021 21:37

Quote:

Originally Posted by BLACKFIRE69 (Post 487767)
XHash Update 1.1v

  • Added more Algos.

    - md5
    - sha1
    - sha256
    - sha512

  • Fixed some bugs.

_

Can You Add This Option (Game files integrity check - XHash Library)
To This Script

BLACKFIRE69 08-02-2022 11:24

XHash New Update
 
3 Attachment(s)
Update available!


What's New:
  • Stable.
  • Faster.
  • Supports both generate and verify checksums.


ChecksumX
Code:

USAGE:
 ChecksumX.exe [generate] [autoclose] [/x=<ExcludeFile>] <Checksum_File> <Algorithm_Index> <Base_Path>

OPTIONS:
 generate  - Generate a checksumfile.
 autoclose - Automatically close when the process is done.
 /x=<file> - Excluding file masks list for generate only.


_

Lord.Freddy 05-08-2022 04:29

Hello. Your file is good, but if I use the VclStyle skin, when the dll file wants to show the error box, the installation file closes suddenly. can you remove the error box from dll :D?

BLACKFIRE69 05-08-2022 06:32

Quote:

Originally Posted by Lord.Freddy (Post 497868)
Hello. Your file is good, but if I use the VclStyle skin, when the dll file wants to show the error box, the installation file closes suddenly. can you remove the error box from dll :D?

can you specify what the error message is?

Lord.Freddy 05-08-2022 07:32

Quote:

Originally Posted by BLACKFIRE69 (Post 497870)
can you specify what the error message is?

https://cdn.discordapp.com/attachmen...4/Rec_0001.mp4

See the error in this link:)

BLACKFIRE69 05-08-2022 07:47

1 Attachment(s)
Quote:

Originally Posted by Lord.Freddy (Post 497871)

sorry i didn't see any error with VclStyle. anyway i'll attach the non-messagebox version of XHash.
if this doesn't work either, send me your sample script so i can take a look.

.

Lord.Freddy 05-08-2022 11:10

Quote:

Originally Posted by BLACKFIRE69 (Post 497872)
sorry i didn't see any error with VclStyle. anyway i'll attach the non-messagebox version of XHash.
if this doesn't work either, send me your sample script so i can take a look.

.

here is my script, please fix the problem(Setup Crash when i chose Cancel button). thank:)

Cesar82 05-08-2022 21:20

1 Attachment(s)
Quote:

Originally Posted by Lord.Freddy (Post 497873)
here is my script, please fix the problem(Setup Crash when i chose Cancel button). thank:)

From what I could understand you can't use MesageBox inside the Callback.
Try with the script attached.

BLACKFIRE69 09-08-2022 06:20

XHash_Next v1.0
 
3 Attachment(s)
XHash_Next v1.0

Quote:

-- Added more algorithms.
-- Added log file for verification.
-- Added support for multiple algorithms in one hash file (ex: hash_mixed.md5) for verification. (Only for MD5, SHA1, SHA256, SHA512)
Code:

hash_mixed.md5

; Generator:  XHashNext DLL v1.0
; Algorithm:  MD5 (128 bits)
; No. Files:  14


; MD5
AC3856A351B3C13556B2386CD13BB6CA  cover.jpg
12F6B355C84327092D1115E5B1DB97D1  GameInfo.txt
ABD14375A3126F9296DCD88132E9652F  OverviewInfo.txt
18FAD69BBCE73113C4A6FB211E6A844F  PicForm.png

; SHA1
F81A451604B9C3606925A2AB3F406CC5C56C729E  PicForm0.png
4B65BA757C862625850D480D574200CEFCDFF162  Reqirements.txt
544A11C86AD0BCBF0ED01019E8250F64A30594EE  Ubuntu.ttf

; SHA256
26D21E5C309FAB938F378A83825284E231B056F0A1894078CF4750F015A7DFC3  wallpapers1.jpg
AE9EE7E81B55B54745B1B5A60F715A52DEDCE1527F154871F3BBDFEAEC9D52EB  wallpapers2.jpg
22022B461C6AF2EBFC3EF817EA941EE5BF7A53B163BFCD26F0CB2C66DC7EC7B0  wallpapers3.jpg
B9232B0D21C4EE1ADAB083C04505322C6F22A6C7008E3E81185ABBC06F6590F5  wallpapers4.jpg

; SHA512
40268B8DF3C4369930AC928B2793F29DF8007D237D3323A7E4F1EF7BBE1CD270035B2E8C01C4DE0E08492914CB6E2FB2146BBB878143172153D480B3FC80B1AD  wallpapers5.jpg
9A06694CB047301BC9DA1120139A70EFA9BCF7439C23705B590844B4D812504462CD023459BB5914BCD4542F512A5FDE0FF617568C016E149451D60FDE19CFF1  Wallpaper_color.jpg
A640305651EFE50B6F62BC0BBF9E53F8E23936B971E1C05289C0B38FF576C86DB3A305F6E02E42CA6E1C493664BE10C930BAA15433EBF3956A3C9D49670635A6  Wallpaper_color2.jpg


Quote:

Algorithm:

CRC32
MD5
SHA1
SHA256
SHA512
SHA512_256
SHA3_256
SHA3_512
BLAKE2_128
BLAKE2_256
BLAKE3_256
HAVAL3_128
HAVAL3_256
RIPEMD_128
RIPEMD_256
TIGER_128
TIGER_192
TIGER2_128
TIGER2_192
MURMURHASH_32
XXHASH_32


Functions:

{ Directory }
function CalculateHashesForDir(ChecksumFile, BasePath: WideString; HashAlgo: Integer; Callback: TMultiHashCallback): Integer;
function VerifyHashesFromFile(ChecksumFile, BasePath: WideString; HashAlgo: Integer; LogFile: Boolean; Callback: TMultiHashCallback): Integer;
function VerifyHashesAutoFromFile(ChecksumFile, BasePath: WideString; LogFile: Boolean; Callback: TMultiHashCallback): Integer;

{ Single file }
function CalculateFileHash(const FileName: WideString; const HashAlgo: Integer; Callback: TSingleFileHashCallback): WideString;
function VerifyFileHash(FileName, HashHexStr: WideString; HashAlgo: Integer; LogFile: Boolean; Callback: TSingleFileHashCallback): Integer;

{ Other }
function SetHashLogMessage(const MessageText: WideString; const MsgID: Integer): Boolean;
procedure SetHashLogFile(const FileName: WideString);
procedure StopHashProcess;
procedure PauseHashProcess;
procedure ResumeHashProcess;


thanks to @Cesar82 for the suggestions for the XHash_Next and testing it.

.

BLACKFIRE69 09-08-2022 13:00

XHash_Next - Update
 
XHash_Next - Update

Quote:

Also added CRC32 support for the "VerifyHashesAutoFromFile".

(currently "VerifyHashesAutoFromFile" supports crc32, md5, sha1, sha256 and sha512)
.

Grumpy 10-08-2022 09:30

Thanks for all these BLACKFIRE69, nice work, keep it up :)

BLACKFIRE69 17-08-2022 05:20

XHashNext - Update
 
XHashNext - Update

Quote:

-- Some improvements.
-- Fixed a minor bug in reading the checksum file.
-- Fixed percentage issues.
-- Fixed an issue where the process would still run after calling stop when "callback" was "nil".
https://i.ibb.co/SfKdTzM/003510.png

Thanks to @Cesar82

check the first post.

BLACKFIRE69 30-11-2022 05:42

XHashNext + ChecksumXNext - Updates
 
3 Attachment(s)
XHashNext + ChecksumXNext - Updates:

Code:

What's new

* Added some new error codes.
* Updated file search.
* Some improvements.


latest version added to first post.


,

BLACKFIRE69 22-12-2022 08:54

ChecksumXNext
 
Update available!

Code:

What's new:

- Minor improvements.


Carldric Clement 14-01-2023 08:08

4 Attachment(s)
Nothing happen to see the Memo and also the Label which is quite on progressing hash generated on Delphi FMX. But the result works fine. :)

Generate with the directory
Code:

function GenerateHashMultiCallback(FileName: WideString; FileSize: extended;
  FileProgress, TotalProgress, TotalFiles, FileCounted,
  StatusCode: Integer): Boolean;
begin
  Form5.Label9.Text := Format(XH_FILENAME, [ExtractFileName(FileName)]);
  Form5.Label10.Text := Format(XH_FILEPOSITION, [ByteOrTb((FileSize * FileProgress) / 100), ByteOrTb(FileSize)]);
  Form5.Label11.Text := Format(XH_PERCENTAGE, [FileProgress]);

  Form5.Label12.Text := Format(XH_PERCENTAGE, [TotalProgress]);
  Form5.ProgressBar1.Value := TotalProgress;

  case StatusCode of
    H_FILE_HASHING_DONE:
      Form5.Memo1.Lines.Add(FileName + '  ... Done!');

    -1,-4,-5,-6,-7,-8,-9,-10,-12,-13:
      Form5.Memo1.Lines.Add('>>> Error code:  ' + IntToStr(StatusCode));
  end;

  Form5.Label14.Text := Format(XH_GENERATESTATUS, [FileCounted, TotalFiles]);

  ProcessMessages;
  Result := CancelAll;
end;


BLACKFIRE69 14-01-2023 11:08

2 Attachment(s)
Quote:

Originally Posted by Carldric Clement (Post 499783)
Nothing happen to see the Memo and also the Label which is quite on progressing hash generated on Delphi FMX. But the result works fine. :)

Generate with the directory
...


XHashNext lib for Inno does not work on Delphi. ;)

try this one.

PS: i haven't implemented error levels(StatusCode) in the callback functions for this example. you can add them to your project later.


.

BLACKFIRE69 14-01-2023 23:53

1 Attachment(s)
Quote:

Originally Posted by BLACKFIRE69 (Post 499791)
XHashNext lib for Inno does not work on Delphi. ;)

try this one.

@Carldric Clement

sorry, i forgot to mention that you can also use the Inno library for Delphi if the callback functions are method pointers.

this is the example...

.

BLACKFIRE69 15-01-2023 02:55

Update - XHashNext + ChecksumXNext
 
Update available!


Reason: Link


check the first post...

Carldric Clement 27-01-2023 08:37

Quote:

Originally Posted by BLACKFIRE69 (Post 499797)
@Carldric Clement

sorry, i forgot to mention that you can also use the Inno library for Delphi if the callback functions are method pointers.

this is the example...

.

can you update your DLL file? my AV detect was a virus. :)
and second, though I've tried many times to make it works with Unit 2. But unfortunately, some labels and progress bar doesn't work on unit 2 using Inno Library which case Form 2 or something that are callback functions. So I'll be hanging these DLLs cause works with a few Forms that I've made before.

Karekas 30-03-2023 13:32

code for inno script, for newbie
 
Quote:

Originally Posted by BLACKFIRE69 (Post 487767)
XHash Update 1.1v

  • Added more Algos.

    - md5
    - sha1
    - sha256
    - sha512

  • Fixed some bugs.

_


Hello, this addon is very nice.

I'm a little newbie, and I wanted to know if you could provide the code to display this screen, like the one attached to this post, so I can add it to my installer.

thank you and a big hug from this Brazilian.

BLACKFIRE69 29-07-2023 08:38

XHashEx + ChecksumX - Updates
 
3 Attachment(s)
Update available!


Code:

* Updated file search. (Thanks to Cesar82)
* Minor improvements.


Check out the first post.


,

Lord.Freddy 31-07-2023 11:32

Hi @BLACKFIRE69, can you update the xxhash algorithm to the last version :D ?
xxHash v0.8.2


All times are GMT -7. The time now is 02:59.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
FileForums @ https://fileforums.com