Go to the documentation of this file.
44 #ifndef CCXX_DIGEST_H_
45 #define CCXX_DIGEST_H_
47 #ifndef CCXX_MISSING_H_
51 #ifndef CCXX_THREAD_H_
55 #ifndef CCXX_EXCEPTION_H_
59 #ifdef CCXX_NAMESPACES
88 virtual unsigned getDigest(
unsigned char *buffer) = 0;
96 virtual void putDigest(
const unsigned char *buffer,
unsigned length) = 0;
143 void putDigest(
const unsigned char *buffer,
unsigned length);
174 {
return sizeof(crc16);};
186 void putDigest (
const unsigned char *buffer,
unsigned length );
215 inline unsigned getSize(
void) {
return sizeof(crc32);}
225 void putDigest(
const unsigned char *buffer,
unsigned length);
239 unsigned long state[4];
240 unsigned long count[2];
241 unsigned char buf[64];
243 unsigned char md5[16];
265 void putDigest(
const unsigned char *buffer,
unsigned len);
268 #ifdef COMMON_STD_EXCEPTION
278 class __EXPORT DigestException :
public Exception {
280 DigestException(
const String &str) : Exception(str) {};
284 #ifdef CCXX_NAMESPACES
u_int32_t uint32
Definition: config.h:147
virtual std::ostream & strDigest(std::ostream &os)=0
print a digest string for export.
void putDigest(const unsigned char *buffer, unsigned length)
unsigned getDigest(unsigned char *buffer)
unsigned char overflow(unsigned char octet)
uint32 getDigest(void)
Definition: digest.h:220
void initDigest(void)
Definition: digest.h:135
The digest base class is used for implementing and deriving one way hashing functions.
Definition: digest.h:71
unsigned getSize(void)
Definition: digest.h:260
unsigned getSize(void)
Definition: digest.h:173
virtual ~CRC16Digest()
Definition: digest.h:167
void putDigest(const unsigned char *buffer, unsigned length)
virtual void initDigest(void)=0
Reset the digest table to an initial default value.
A crc16 collection/compution hash accumulator class.
Definition: digest.h:153
unsigned getSize(void)
Definition: digest.h:138
CRC32Digest(const CRC32Digest &crc)
friend std::ostream & operator<<(std::ostream &os, Digest &ia)
Definition: digest.h:105
unsigned getDigest(unsigned char *buffer)
#define __EXPORT
Definition: config.h:979
virtual void putDigest(const unsigned char *buffer, unsigned length)=0
Put data into the digest bypassing the stream subsystem.
void putDigest(const unsigned char *buffer, unsigned len)
void initDigest(void)
Definition: digest.h:171
A crc32 collection/computation hash accumulator class.
Definition: digest.h:198
unsigned getSize(void)
Definition: digest.h:215
std::ostream & strDigest(std::ostream &os)
uint16 getDigest(void)
Definition: digest.h:181
void initDigest(uint16 crc)
Definition: digest.h:169
substitute functions which may be missing in target platform libc.
virtual unsigned getSize(void)=0
Get the size of a digest in octets.
std::ostream & strDigest(std::ostream &os)
CRC16Digest(const CRC16Digest &crc)
virtual unsigned getDigest(unsigned char *buffer)=0
Copy the binary digest buffer to user memory.
void putDigest(const unsigned char *buffer, unsigned length)
unsigned getDigest(unsigned char *buffer)
GNU Common C++ exception model base classes.
std::ostream & strDigest(std::ostream &os)
u_int16_t uint16
Definition: config.h:145
A md5 collection/computation accululator class.
Definition: digest.h:237
std::ostream & strDigest(std::ostream &os)
Synchronization and threading services.
This is a generic and portable string class.
Definition: string.h:81
A simple checksum digest function.
Definition: digest.h:124
unsigned getDigest(unsigned char *buffer)