Embedded systems coursework 2.
Fork of Crypto_light by
Embed:
(wiki syntax)
Show/hide line numbers
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
Generated on Wed Jul 20 2022 22:55:43 by 1.7.2