Anti-Cheat Toolkit  2023.2.6
Multi-purpose anti-cheat solution for Unity Engine
HashGeneratorResult Class Reference

Public Member Functions

bool HasFileHash (string hash)
void PrintToConsole ()


string SummaryHash [get]
IReadOnlyList< FileHashFileHashes [get]
string ErrorMessage [get]
bool Success [get]
double DurationSeconds [get]

Detailed Description

Result produced by CodeHashGenerator. Contains resulting code hash or errors information.

Member Function Documentation

◆ HasFileHash()

bool HasFileHash ( string  hash)

Checks is passes hash exists in file hashes of this instance.

hashTarget file hash.
True if such hash presents at FileHashes and false otherwise.

◆ PrintToConsole()

void PrintToConsole ( )

Prints found hashes to the console (if any).

Property Documentation

◆ SummaryHash

string SummaryHash

Summary hash for all files in currently running build. May be null in case Success is not true.

Use with caution: summary hash for runtime build may differ from the summary hash you got in Editor, for example, for Android App Bundles. Use FileHashes for more accurate hashes comparison control.

◆ FileHashes

IReadOnlyList<FileHash> FileHashes

Hashes for all files in currently running build. Feel free to compare it against hashes array you got in Editor to find if runtime version has new unknown hashes (this is an indication build was altered).

◆ ErrorMessage

string ErrorMessage

Error message you could find useful in case Success is not true.

◆ Success

bool Success

True if generation was successful and resulting hashes are stored in FileHashes, otherwise check ErrorMessage to find out error cause.

◆ DurationSeconds

double DurationSeconds

Hashing duration in seconds. Will be 0 if hashing was not succeed.