Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
hmac/hmac-sha-256.h@4:6a1d887f1cad, 2019-08-20 (annotated)
- Committer:
- andrewboyson
- Date:
- Tue Aug 20 14:50:48 2019 +0000
- Revision:
- 4:6a1d887f1cad
- Parent:
- 0:be515c9019e3
- Child:
- 7:94ef5824c3c0
Continued work to implement TLS
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
andrewboyson | 4:6a1d887f1cad | 1 | #include <stdint.h> |
andrewboyson | 4:6a1d887f1cad | 2 | #include "sha256.h" |
andrewboyson | 0:be515c9019e3 | 3 | |
andrewboyson | 4:6a1d887f1cad | 4 | struct HmacSha256Struct |
andrewboyson | 4:6a1d887f1cad | 5 | { |
andrewboyson | 4:6a1d887f1cad | 6 | uint8_t hmacKey[SHA_BLOCK_SIZE]; |
andrewboyson | 4:6a1d887f1cad | 7 | struct Sha256State shaStruct; |
andrewboyson | 4:6a1d887f1cad | 8 | uint8_t tmpHash[SHA_HASH_SIZE]; |
andrewboyson | 4:6a1d887f1cad | 9 | }; |
andrewboyson | 4:6a1d887f1cad | 10 | |
andrewboyson | 4:6a1d887f1cad | 11 | extern void HmacSha256(const uint8_t* key, int keyLength, const uint8_t* message, int messageLength, uint8_t* mac); |
andrewboyson | 4:6a1d887f1cad | 12 | |
andrewboyson | 4:6a1d887f1cad | 13 | extern void HmacSha256Start (struct HmacSha256Struct* md, const uint8_t* key, int keyLength); |
andrewboyson | 4:6a1d887f1cad | 14 | extern void HmacSha256Add (struct HmacSha256Struct* md, const uint8_t* message, int messageLength); |
andrewboyson | 4:6a1d887f1cad | 15 | extern void HmacSha256Finish(struct HmacSha256Struct* md, uint8_t* mac); |