TAY
Fork of Crypto_light by
hash/HMAC.h@16:d387221543a5, 2018-03-23 (annotated)
- Committer:
- ahaliassos
- Date:
- Fri Mar 23 22:05:23 2018 +0000
- Revision:
- 16:d387221543a5
- Parent:
- 10:bc9c23aa3870
commit
Who changed what in which revision?
User | Revision | Line number | New 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 |