|
Nestopia Core API | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Core::ImplicitBool
|
+--Nes::Api::Cartridge::Profile::Hash
Hash checksum. Stores SHA-1 and CRC-32 combined or just one of the two.
Constructor Summary | |
Hash( const char* sha, const char* crc )
Constructs new checksum from null-terminated strings. |
|
Hash( const wchar_t* sha, const wchar_t* crc )
Constructs new checksum from null-terminated wide-strings. |
|
Hash( const dword* sha, dword crc )
Constructs new checksum from input values. |
|
Hash()
Default constructor. |
Method Summary | |
void |
Assign( const wchar_t* sha, const wchar_t* crc )
Assigns new checksum from null-terminated wide-strings. |
void |
Assign( const dword* sha, dword crc )
Assigns new checksum from input values. |
void |
Assign( const char* sha, const char* crc )
Assigns new checksum from null-terminated strings. |
void |
Clear()
Clears the current checksum. |
void |
Compute( const void* mem, ulong length )
Computes and updates checksum from input. |
void |
Get( char* sha, char* crc ) const
Returns the current checksum. |
dword |
GetCrc32() const
Returns the current CRC-32 value. |
const dword* |
GetSha1() const
Returns the current SHA-1 values. |
bool |
operator!() const
Checks if checksum is cleared. |
bool |
operator<( const Hash& hash ) const
Tests for less-than. |
bool |
operator==( const Hash& hash ) const
Tests for equality. |
Constructor Detail |
public Hash( const char* sha, const char* crc ) throw();
sha
- SHA-1 string, set to NULL if values shouldn't be used
crc
- CRC-32 string, set to NULL if value shouldn't be usedpublic Hash( const wchar_t* sha, const wchar_t* crc ) throw();
sha
- SHA-1 string, set to NULL if values shouldn't be used
crc
- CRC-32 string, set to NULL if value shouldn't be usedpublic Hash( const dword* sha, dword crc ) throw();
sha
- SHA-1 value, set to NULL if values shouldn't be used
crc
- CRC-32 value, set to 0 if value shouldn't be usedpublic Hash() throw();
Method Detail |
public void Assign( const wchar_t* sha, const wchar_t* crc ) throw();
sha
- SHA-1 string, set to NULL if values shouldn't be used
crc
- CRC-32 string, set to NULL if value shouldn't be usedpublic void Assign( const dword* sha, dword crc ) throw();
sha
- SHA-1 value, set to NULL if values shouldn't be used
crc
- CRC-32 value, set to 0 if value shouldn't be usedpublic void Assign( const char* sha, const char* crc ) throw();
sha
- SHA-1 string, set to NULL if values shouldn't be used
crc
- CRC-32 string, set to NULL if value shouldn't be usedpublic void Clear() throw();
public void Compute( const void* mem, ulong length ) throw();
mem
- pointer to memory
length
- length of memory in bytespublic void Get( char* sha, char* crc ) const throw();
sha
- SHA-1 string to be filled, set to to NULL if not needed
crc
- CRC-32 string to be filled, set to NULL if not neededpublic dword GetCrc32() const throw();
public const dword* GetSha1() const throw();
public bool operator!() const throw();
public bool operator<( const Hash& hash ) const throw();
hash
- hash to compare withpublic bool operator==( const Hash& hash ) const throw();
hash
- hash to compare with
|
Nestopia Core API | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |