/* SPDX-License-Identifier: Apache-2.0 */ #ifndef SETTLE_SHA256_H #define SETTLE_SHA256_H #include #include typedef struct { uint32_t h[8]; uint64_t len; uint8_t buf[64]; size_t n; } sha256_t; void sha256_init(sha256_t *c); void sha256_update(sha256_t *c, const void *data, size_t len); void sha256_final(sha256_t *c, uint8_t out[32]); void sha256(const void *data, size_t len, uint8_t out[32]); void hex32(const uint8_t in[32], char out[65]); #endif