sha256_endianness
SHA-256 endianness definition used in the API.
Definition sha256.h:49
void pico_sha256_update(pico_sha256_state_t *state, const uint8_t *data, size_t data_size_bytes)
Add byte data to be SHA-256 calculation.
Definition sha256.c:147
void pico_sha256_finish(pico_sha256_state_t *state, sha256_result_t *out)
Finish the SHA-256 calculation and return the result.
Definition sha256.c:177
int pico_sha256_try_start(pico_sha256_state_t *state, enum sha256_endianness endianness, bool use_dma)
Start a SHA-256 calculation returning immediately with an error if the SHA-256 hardware is not availa...
Definition sha256.c:39
int pico_sha256_start_blocking_until(pico_sha256_state_t *state, enum sha256_endianness endianness, bool use_dma, absolute_time_t until)
Start a SHA-256 calculation waiting for a defined period for the SHA-256 hardware to be available.
Definition sha256.c:65
void pico_sha256_update_blocking(pico_sha256_state_t *state, const uint8_t *data, size_t data_size_bytes)
Add byte data to be SHA-256 calculation.
Definition sha256.c:151
struct pico_sha256_state pico_sha256_state_t
SHA-256 state used by the API.
void pico_sha256_cleanup(pico_sha256_state_t *state)
Release the internal lock on the SHA-256 hardware.
Definition sha256.c:33
static int pico_sha256_start_blocking(pico_sha256_state_t *state, enum sha256_endianness endianness, bool use_dma)
Start a SHA-256 calculation, blocking forever waiting until the SHA-256 hardware is available.
Definition sha256.h:109
const absolute_time_t at_the_end_of_time
The timestamp representing the end of time; this is actually not the maximum possible timestamp,...
uint64_t absolute_time_t
An opaque 64 bit timestamp in microseconds.
Definition types.h:43
SHA-256 state used by the API.
Definition sha256.h:48
size_t total_data_size
Total number of bytes added to the calculation so far.
Definition sha256.h:58
dma_channel_config config
DMA channel configuration.
Definition sha256.h:57
int8_t channel
DMA channel in use, or -1 if DMA is not being used.
Definition sha256.h:50
uint8_t bytes[4]
Cache contents as individual bytes.
Definition sha256.h:55
bool locked
Whether the SHA-256 hardware lock is currently held.
Definition sha256.h:51
uint32_t word
Cache contents as a 32-bit word.
Definition sha256.h:54
uint8_t cache_used
Number of bytes currently stored in the partial-word cache.
Definition sha256.h:52
union pico_sha256_state::@262016307016201252276264024006336042341321252243 cache
Partial-word cache for data not yet written to hardware.
enum sha256_endianness endianness
Endianness for data in and data out.
Definition sha256.h:49
SHA-256 result generated by the API.
Definition sha256.h:57