This library implements some hash and cryptographic algorithms.

Dependents:   ES_CW2_Starter_JIN EMBEDDED_CW2 EMBEDDED_CW2_Final Spinnybois ... more

Fork of Crypto by Francois Berder

Committer:
estott
Date:
Fri Mar 09 10:10:16 2018 +0000
Revision:
15:634f9c4cbab1
Parent:
10:bc9c23aa3870
Reduced flash footprint by removing __forceinline directive in SHA2_32.c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
feb11 10:bc9c23aa3870 1 #ifndef HMAC_H
feb11 10:bc9c23aa3870 2 #define HMAC_H
feb11 10:bc9c23aa3870 3
feb11 10:bc9c23aa3870 4 #include "HashAlgorithm.h"
feb11 10:bc9c23aa3870 5
feb11 10:bc9c23aa3870 6 class HMAC
feb11 10:bc9c23aa3870 7 {
feb11 10:bc9c23aa3870 8 public :
feb11 10:bc9c23aa3870 9
feb11 10:bc9c23aa3870 10 HMAC(HashAlgorithm *hashAlgo, uint8_t *k, uint32_t kl);
feb11 10:bc9c23aa3870 11 virtual ~HMAC();
feb11 10:bc9c23aa3870 12
feb11 10:bc9c23aa3870 13 void update(uint8_t *data, uint32_t length);
feb11 10:bc9c23aa3870 14 void finalize(uint8_t *hash);
feb11 10:bc9c23aa3870 15
feb11 10:bc9c23aa3870 16 private :
feb11 10:bc9c23aa3870 17
feb11 10:bc9c23aa3870 18 HashAlgorithm *algo;
feb11 10:bc9c23aa3870 19 uint8_t key[64];
feb11 10:bc9c23aa3870 20 uint32_t keyLength;
feb11 10:bc9c23aa3870 21 };
feb11 10:bc9c23aa3870 22
feb11 10:bc9c23aa3870 23 #endif