This library implements some hash and cryptographic algorithms.

Dependents:   mBuinoBlinky PB_Emma_Ethernet SLOTrashHTTP Garagem ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers MD4.h Source File

MD4.h

00001 #ifndef MD4_H
00002 #define MD4_H
00003 
00004 #include "HashAlgorithm.h"
00005 
00006 class MD4: public HashAlgorithm
00007 {
00008     public :
00009     
00010         MD4();
00011         
00012         virtual uint8_t outputSize() const;
00013         virtual void update(uint8_t *data, uint32_t length);
00014         virtual void finalize(uint8_t *hash);
00015         
00016         static void computeHash(uint8_t *hash, uint8_t *data, uint32_t length);
00017         
00018     private :
00019     
00020         static void computeRounds(uint32_t *a2, uint32_t *b2, uint32_t *c2, uint32_t *d2, uint8_t *buffer);
00021         
00022         uint32_t a,b,c,d;
00023         uint32_t totalBufferLength;
00024         uint8_t buffer[64];
00025         uint8_t bufferLength;
00026 };
00027 
00028 #endif