Andrew Boyson / crypto

Dependents:   oldheating gps motorhome heating

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?

UserRevisionLine numberNew 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);