Semi Mod Loader
Static Public Member Functions | List of all members
Semi.ModVerification Class Reference

Static Public Member Functions

static byte[] GetModHash (string dir_path, ModConfig config)
 Calculates a checksum of all files in the directory. More...
 
static bool ValidateHash (byte[] valid, byte[] computed)
 Compares two hashes. More...
 
static bool ValidateHashOnline (string mod_id, byte[] hash)
 Compares two hashes based on the SemiModVerification repository. More...
 

Member Function Documentation

◆ GetModHash()

static byte [] Semi.ModVerification.GetModHash ( string  dir_path,
ModConfig  config 
)
inlinestatic

Calculates a checksum of all files in the directory.

Returns
The mod's checksum.
Parameters
dir_pathPath to the mod's directory.
configThe mod's config object.

◆ ValidateHash()

static bool Semi.ModVerification.ValidateHash ( byte[]  valid,
byte[]  computed 
)
inlinestatic

Compares two hashes.

Returns
true, if hashes match, false otherwise.
Parameters
validThe known valid hash.
computedThe computed hash..

◆ ValidateHashOnline()

static bool Semi.ModVerification.ValidateHashOnline ( string  mod_id,
byte[]  hash 
)
inlinestatic

Compares two hashes based on the SemiModVerification repository.

Returns
true, if hashes match, false otherwise.
Parameters
mod_idID of the mod.
hashThe computed hash.

The documentation for this class was generated from the following file: