Go to the source code of this file.
Data Structures | |
| union | sha256_result_t |
| SHA-256 result generated by the API. More... | |
Macros | |
| #define | PARAM_ASSERTIONS_ENABLED_HARDWARE_SHA256 0 |
| #define | SHA256_RESULT_BYTES 32 |
| Size of a sha256 result in bytes. | |
Enumerations | |
| enum | sha256_endianness { SHA256_LITTLE_ENDIAN , SHA256_BIG_ENDIAN } |
| SHA-256 endianness definition used in the API. More... | |
Functions | |
| static void | sha256_set_dma_size (uint size_in_bytes) |
| Configure the correct DMA data size. | |
| static void | sha256_set_bswap (bool swap) |
| Enable or disable byte swapping of 32-bit values. | |
| static void | sha256_start (void) |
| Prepare the hardware for a new checksum. | |
| static bool | sha256_is_sum_valid (void) |
| Check if a valid checksum has been calculated. | |
| static bool | sha256_is_ready (void) |
| Check if a the hardware is ready to accept more data. | |
| static void | sha256_wait_valid_blocking (void) |
| Wait until the checksum is valid. | |
| static void | sha256_wait_ready_blocking (void) |
| Wait until the hardware is ready to accept more data. | |
| void | sha256_get_result (sha256_result_t *out, enum sha256_endianness endianness) |
| Get the checksum result. | |
| static bool | sha256_err_not_ready (void) |
| Check if data was written before the hardware was ready. | |
| static void | sha256_err_not_ready_clear (void) |
| Clear the "not ready" error condition. | |
| static volatile void * | sha256_get_write_addr (void) |
| Address to write the data to be hashed. | |
| static void | sha256_put_word (uint32_t word) |
| Write one 32bit word of data to the SHA-256 hardware. | |
| static void | sha256_put_byte (uint8_t b) |
| Write one byte of data to the SHA-256 hardware. | |