49 #define MY_CRYPTO_SHA256_ASM
54 #define SHA256_HASH_BITS 256
55 #define SHA256_HASH_BYTES (SHA256_HASH_BITS/8)
56 #define SHA256_BLOCK_BITS 512
57 #define SHA256_BLOCK_BYTES (SHA256_BLOCK_BITS/8)
75 typedef uint8_t sha256_hash_t[SHA256_HASH_BYTES];
94 void sha256_nextBlock(
sha256_ctx_t *state,
const void *block);
105 void sha256_lastBlock(
sha256_ctx_t *state,
const void *block, uint16_t length_b);
114 void sha256_ctx2hash(sha256_hash_t *dest,
const sha256_ctx_t *state);
125 void sha256(sha256_hash_t *dest,
const void *msg, uint32_t length_b);