PixelLightAPI
.
|
Abstract checksum ("digital fingerprint") base class. More...
#include <Checksum.h>
Public Member Functions | |
PLCORE_API String | Get (const uint8 *pnBuffer, uint32 nNumOfBytes) |
Returns the checksum of a given buffer. | |
PLCORE_API String | Get (const String &sString) |
Returns the checksum of a given string. | |
PLCORE_API String | Get (File &cFile) |
Returns the checksum of a given file. | |
PLCORE_API String | GetFile (const String &sFilename) |
Returns the checksum of a given file. | |
Protected Member Functions | |
PLCORE_API | Checksum () |
Default constructor. | |
virtual PLCORE_API | ~Checksum () |
Destructor. | |
virtual void | Update (const uint8 nInput[], uint32 nInputLen)=0 |
Implementation of main checksum algorithm. | |
virtual String | Final ()=0 |
Implementation of main checksum algorithm; ends the checksum calculation. |
Abstract checksum ("digital fingerprint") base class.
PLCORE_API PLCore::Checksum::Checksum | ( | ) | [protected] |
Default constructor.
virtual PLCORE_API PLCore::Checksum::~Checksum | ( | ) | [protected, virtual] |
Destructor.
PLCORE_API String PLCore::Checksum::Get | ( | const uint8 * | pnBuffer, |
uint32 | nNumOfBytes | ||
) |
Returns the checksum of a given buffer.
[in] | pnBuffer | Buffer to create the checksum from (MUST be valid!) |
[in] | nNumOfBytes | Number of bytes of the given buffer (MUST be valid!) |
PLCORE_API String PLCore::Checksum::Get | ( | const String & | sString | ) |
Returns the checksum of a given string.
[in] | sString | String to create the checksum from, the original internal format is used - if it's a Unicode string, Unicode will be used to get the checksum |
PLCORE_API String PLCore::Checksum::Get | ( | File & | cFile | ) |
Returns the checksum of a given file.
[in] | cFile | File to create the checksum from (MUST be opened and readable!) |
PLCORE_API String PLCore::Checksum::GetFile | ( | const String & | sFilename | ) |
Returns the checksum of a given file.
[in] | sFilename | Name of the file to create the checksum from |
virtual void PLCore::Checksum::Update | ( | const uint8 | nInput[], |
uint32 | nInputLen | ||
) | [protected, pure virtual] |
Implementation of main checksum algorithm.
[in] | nInput | Input block |
[in] | nInputLen | Length of input block in bytes |
virtual String PLCore::Checksum::Final | ( | ) | [protected, pure virtual] |
Implementation of main checksum algorithm; ends the checksum calculation.
|