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

Public Member Functions

bool HasFileHash (string hash)
 
void PrintToConsole ()
 

Properties

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)
inline

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

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

◆ PrintToConsole()

void PrintToConsole ( )
inline

Prints found hashes to the console (if any).

Property Documentation

◆ SummaryHash

string SummaryHash
get

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
get

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
get

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

◆ Success

bool Success
get

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

◆ DurationSeconds

double DurationSeconds
get

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