nCine  2025.04.r498-9d36345
A cross-platform 2D game engine
Classes | Public Member Functions | List of all members
ncine::Hash64 Class Reference

Utility methods to calculate a uint64_t hash from strings or files. More...

#include <Hash64.h>

Classes

struct  Statistics
 The statistics about hashing requests. More...
 

Public Member Functions

uint64_t hashStrings (unsigned int count, const char **strings, const int *lengths) const
 Returns a hash number by hashing all characters of the given strings.
 
uint64_t hashString (const char *string, int length) const
 Returns a hash number by hashing all characters of the given string.
 
uint64_t hashFileStat (const char *filename) const
 Returns a hash number by hashing the date, size, and name of the given file.
 
uint64_t scanHashString (const char *string, unsigned int length) const
 Returns a hash number by scanning a hash string of the given length. More...
 
uint64_t scanHashString (const char *string) const
 Returns a hash number by scanning a hash string. More...
 
const Statisticsstatistics () const
 Returns the statistics about the hashing requests.
 
void clearStatistics ()
 Resets the statistics to zero requests.
 

Detailed Description

Utility methods to calculate a uint64_t hash from strings or files.

Member Function Documentation

◆ scanHashString() [1/2]

uint64_t ncine::Hash64::scanHashString ( const char *  string) const

Returns a hash number by scanning a hash string.

Note
Can be used to scan MD5 sums from CMake file(MD5) command (128 bits, 32 chars) or BinaryShaderCache fasthash64() hashes (64 bits, 16 chars)

◆ scanHashString() [2/2]

uint64_t ncine::Hash64::scanHashString ( const char *  string,
unsigned int  length 
) const

Returns a hash number by scanning a hash string of the given length.

Note
Can be used to scan MD5 sums from CMake file(MD5) command (128 bits, 32 chars) or BinaryShaderCache fasthash64() hashes (64 bits, 16 chars)

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