Andrew Boyson / crypto

Dependents:   oldheating gps motorhome heating

sha/sha256.h

Committer:
andrewboyson
Date:
2019-08-02
Revision:
3:e6a2c4579a4d
Child:
4:6a1d887f1cad

File content as of revision 3:e6a2c4579a4d:

#include <stdint.h>

struct Sha256State
{
    uint64_t length;
    uint32_t curlen;
    uint32_t state[8];
    uint8_t  buf[64];
};

extern void Sha256Start (struct Sha256State *md);
extern int  Sha256Add   (struct Sha256State *md, const uint8_t *in, int inlen);
extern int  Sha256Finish(struct Sha256State *md,       uint8_t *out          );