An interface for checksum methods.
More...
#include <libppbase/base_crypto/CryptoChecksum.h>
List of all members.
Detailed Description
An interface for checksum methods.
- Author:
- Christoph Schwarz
- Version:
- $Id: CryptoChecksum.h 21 2010-09-05 04:18:17Z cschwarz1 $
Member Enumeration Documentation
The checksum methods (algorithms).
- Enumerator:
checksumUndef |
unset algorithm
|
checksumMD5 |
MD5 algorithm.
|
checksumRIPEMD160 |
RIPEMD160 algorithm.
|
checksumSHA1 |
SHA1 algorithm.
|
Member Function Documentation
Creates a new checksum object.
- Parameters:
-
- Returns:
- NULL if the method is unknown
static CryptoChecksum* base_crypto::CryptoChecksum::create |
( |
const char * |
name |
) |
[static] |
Creates a new checksum object.
- Parameters:
-
| name | the name of the method to use |
- Returns:
- NULL if the method is unknown
virtual void base_crypto::CryptoChecksum::final |
( |
unsigned char * |
buf |
) |
[pure virtual] |
Finalizes the checksum.
- Parameters:
-
| buf | buffer that receives the checksum, must be at least getSize() bytes large |
Finalizes the checksum.
- Returns:
- the checksum
static checksumMethod base_crypto::CryptoChecksum::getMethodByName |
( |
const char * |
name |
) |
[static] |
Gets a checksum method by name.
- Parameters:
-
| name | the name of the method |
- Returns:
- checksumUndef if the method is unknown, otherwise the method ID
virtual checksumMethod base_crypto::CryptoChecksum::getMethodId |
( |
|
) |
const [pure virtual] |
Gets the ID of the checksum method.
- Returns:
- the ID
virtual const char* base_crypto::CryptoChecksum::getMethodName |
( |
|
) |
const [pure virtual] |
Gets the name of the checksum method.
- Returns:
- the name
virtual unsigned base_crypto::CryptoChecksum::getSize |
( |
|
) |
const [pure virtual] |
Gets the size of the checksum in bytes.
- Returns:
- size of the checksum in bytes
void base_crypto::CryptoChecksum::update |
( |
const base::String & |
data |
) |
|
Calculates the checksum incrementally.
- Parameters:
-
| data | data to calculate the checksum over, excluding the terminating 0-byte |
virtual void base_crypto::CryptoChecksum::update |
( |
const void * |
data, |
|
|
size_t |
len | |
|
) |
| | [pure virtual] |
Calculates the checksum incrementally.
- Parameters:
-
| data | data to calculate the checksum over |
| len | length of the data in bytes |
void base_crypto::CryptoChecksum::update1 |
( |
const base::String & |
data |
) |
|
Calculates the checksum incrementally.
- Parameters:
-
| data | data to calculate the checksum over, including the terminating 0-byte |
The documentation for this class was generated from the following file: