Table of Contents

Class HashUtils

Namespace
CodeStage.AntiCheat.Utils
Assembly
Build.dll

Utility class for calculating and validating hash values for various data types. Used by ACTk's Obscured types for integrity checking and tamper detection.

⚠️ Important: Hash functions can produce collisions - different inputs may generate the same hash value. This is normal behavior for hash functions and should be considered when using these methods.

public static class HashUtils
Inheritance
object
HashUtils

Methods

CalculateHash(bool)

public static int CalculateHash(bool x)

Parameters

x bool

Returns

int

CalculateHash(char[])

public static int CalculateHash(char[] input)

Parameters

input char[]

Returns

int

CalculateHash(DateTime)

public static int CalculateHash(DateTime x)

Parameters

x DateTime

Returns

int

CalculateHash(DateTimeOffset)

public static int CalculateHash(DateTimeOffset x)

Parameters

x DateTimeOffset

Returns

int

CalculateHash(decimal)

public static int CalculateHash(decimal x)

Parameters

x decimal

Returns

int

CalculateHash(double)

public static int CalculateHash(double x)

Parameters

x double

Returns

int

CalculateHash(Guid)

public static int CalculateHash(Guid x)

Parameters

x Guid

Returns

int

CalculateHash(int)

public static int CalculateHash(int x)

Parameters

x int

Returns

int

CalculateHash(long)

public static int CalculateHash(long x)

Parameters

x long

Returns

int

CalculateHash(BigInteger)

public static int CalculateHash(BigInteger x)

Parameters

x BigInteger

Returns

int

CalculateHash(float)

public static int CalculateHash(float x)

Parameters

x float

Returns

int

CalculateHash(string)

public static int CalculateHash(string input)

Parameters

input string

Returns

int

CalculateHash(uint)

public static int CalculateHash(uint x)

Parameters

x uint

Returns

int

CalculateHash(ulong)

public static int CalculateHash(ulong x)

Parameters

x ulong

Returns

int

CalculateHash(Quaternion)

public static int CalculateHash(Quaternion input)

Parameters

input Quaternion

Returns

int

CalculateHash(Vector2)

public static int CalculateHash(Vector2 input)

Parameters

input Vector2

Returns

int

CalculateHash(Vector2Int)

public static int CalculateHash(Vector2Int input)

Parameters

input Vector2Int

Returns

int

CalculateHash(Vector3)

public static int CalculateHash(Vector3 input)

Parameters

input Vector3

Returns

int

CalculateHash(Vector3Int)

public static int CalculateHash(Vector3Int input)

Parameters

input Vector3Int

Returns

int

CalculateHashGeneric<T>(T)

public static int CalculateHashGeneric<T>(T input)

Parameters

input T

Returns

int

Type Parameters

T

ValidateHash(bool, int)

public static bool ValidateHash(bool input, int hash)

Parameters

input bool
hash int

Returns

bool

ValidateHash(char[], int)

public static bool ValidateHash(char[] input, int hash)

Parameters

input char[]
hash int

Returns

bool

ValidateHash(DateTimeOffset, int)

public static bool ValidateHash(DateTimeOffset input, int hash)

Parameters

input DateTimeOffset
hash int

Returns

bool

ValidateHash(decimal, int)

public static bool ValidateHash(decimal input, int hash)

Parameters

input decimal
hash int

Returns

bool

ValidateHash(double, int)

public static bool ValidateHash(double input, int hash)

Parameters

input double
hash int

Returns

bool

ValidateHash(Guid, int)

public static bool ValidateHash(Guid input, int hash)

Parameters

input Guid
hash int

Returns

bool

ValidateHash(int, int)

public static bool ValidateHash(int input, int hash)

Parameters

input int
hash int

Returns

bool

ValidateHash(long, int)

public static bool ValidateHash(long input, int hash)

Parameters

input long
hash int

Returns

bool

ValidateHash(BigInteger, int)

public static bool ValidateHash(BigInteger input, int hash)

Parameters

input BigInteger
hash int

Returns

bool

ValidateHash(float, int)

public static bool ValidateHash(float input, int hash)

Parameters

input float
hash int

Returns

bool

ValidateHash(uint, int)

public static bool ValidateHash(uint input, int hash)

Parameters

input uint
hash int

Returns

bool

ValidateHash(ulong, int)

public static bool ValidateHash(ulong input, int hash)

Parameters

input ulong
hash int

Returns

bool

ValidateHash(Quaternion, int)

public static bool ValidateHash(Quaternion input, int hash)

Parameters

input Quaternion
hash int

Returns

bool

ValidateHash(Vector2, int)

public static bool ValidateHash(Vector2 input, int hash)

Parameters

input Vector2
hash int

Returns

bool

ValidateHash(Vector2Int, int)

public static bool ValidateHash(Vector2Int input, int hash)

Parameters

input Vector2Int
hash int

Returns

bool

ValidateHash(Vector3, int)

public static bool ValidateHash(Vector3 input, int hash)

Parameters

input Vector3
hash int

Returns

bool

ValidateHash(Vector3Int, int)

public static bool ValidateHash(Vector3Int input, int hash)

Parameters

input Vector3Int
hash int

Returns

bool