A simple library to support serving https.

Dependents:   oldheating gps motorhome heating

Committer:
andrewboyson
Date:
Fri Aug 02 15:07:18 2019 +0000
Revision:
3:e6a2c4579a4d
Child:
4:6a1d887f1cad
Changed SHA-256 to be addable rather than all at once so that it can be used with TLS handshakes.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
andrewboyson 3:e6a2c4579a4d 1 #include <stdint.h>
andrewboyson 3:e6a2c4579a4d 2
andrewboyson 3:e6a2c4579a4d 3 struct Sha256State
andrewboyson 3:e6a2c4579a4d 4 {
andrewboyson 3:e6a2c4579a4d 5 uint64_t length;
andrewboyson 3:e6a2c4579a4d 6 uint32_t curlen;
andrewboyson 3:e6a2c4579a4d 7 uint32_t state[8];
andrewboyson 3:e6a2c4579a4d 8 uint8_t buf[64];
andrewboyson 3:e6a2c4579a4d 9 };
andrewboyson 3:e6a2c4579a4d 10
andrewboyson 3:e6a2c4579a4d 11 extern void Sha256Start (struct Sha256State *md);
andrewboyson 3:e6a2c4579a4d 12 extern int Sha256Add (struct Sha256State *md, const uint8_t *in, int inlen);
andrewboyson 3:e6a2c4579a4d 13 extern int Sha256Finish(struct Sha256State *md, uint8_t *out );