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 MD2.h Source File

MD2.h

00001 #ifndef MD2_H
00002 #define MD2_H
00003 
00004 #include "HashAlgorithm.h"
00005 
00006 class MD2 : public HashAlgorithm
00007 {
00008     public :
00009     
00010         MD2();
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 computeBlock(uint8_t *checksum, uint8_t *x, uint8_t *l2, uint8_t *buffer2);
00021     
00022         uint8_t bufferLength;
00023         uint8_t l;
00024         uint8_t buffer[16];
00025         uint8_t checksum[16];
00026         uint8_t x[48];
00027 };
00028 
00029 
00030 #endif