123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- #ifndef SHA256_H
- #define SHA256_H
- #include <stdint.h>
- #include "sdk_errors.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- typedef struct {
- uint8_t data[64];
- uint32_t datalen;
- uint64_t bitlen;
- uint32_t state[8];
- } sha256_context_t;
- ret_code_t sha256_init(sha256_context_t *ctx);
- ret_code_t sha256_update(sha256_context_t *ctx, const uint8_t * data, const size_t len);
- ret_code_t sha256_final(sha256_context_t *ctx, uint8_t * hash, uint8_t le);
- #ifdef __cplusplus
- }
- #endif
- #endif
|