libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
Go to the source code of this file.
Macros | |
#define | HASH_BASE (PERIPH_BASE_AHB2 + 0x60400) |
#define | HASH HASH_BASE |
#define | HASH_CR MMIO32(HASH + 0x00) |
#define | HASH_DIN MMIO32(HASH + 0x04) |
#define | HASH_STR MMIO32(HASH + 0x08) |
#define | HASH_HR (&MMIO32(HASH + 0x0C)) /* x5 */ |
#define | HASH_IMR MMIO32(HASH + 0x20) |
#define | HASH_SR MMIO32(HASH + 0x28) |
#define | HASH_CSR (&MMIO32(HASH + 0xF8)) /* x51 */ |
#define | HASH_CR_INIT (1 << 2) |
#define | HASH_CR_DMAE (1 << 3) |
#define | HASH_DATA_32BIT (0 << 4) |
#define | HASH_DATA_16BIT (1 << 4) |
#define | HASH_DATA_8BIT (2 << 4) |
#define | HASH_DATA_BITSTRING (3 << 4) |
#define | HASH_CR_DATATYPE (3 << 4) |
#define | HASH_MODE_HASH (0 << 6) |
#define | HASH_MODE_HMAC (1 << 6) |
#define | HASH_CR_MODE (1 << 6) |
#define | HASH_ALGO_SHA1 (0 << 7) |
#define | HASH_ALGO_MD5 (1 << 7) |
#define | HASH_CR_ALGO (1 << 7) |
#define | HASH_CR_NBW (15 << 8) |
#define | HASH_CR_DINNE (1 << 12) |
#define | HASH_KEY_SHORT (0 << 16) |
#define | HASH_KEY_LONG (1 << 16) |
#define | HASH_CR_LKEY (1 << 16) |
#define | HASH_STR_NBW (31 << 0) |
#define | HASH_STR_DCAL (1 << 8) |
#define | HASH_IMR_DINIE (1 << 0) |
#define | HASH_IMR_DCIE (1 << 1) |
#define | HASH_SR_DINIS (1 << 0) |
#define | HASH_SR_DCIS (1 << 1) |
#define | HASH_SR_DMAS (1 << 2) |
#define | HASH_SR_BUSY (1 << 3) |
Functions | |
void | hash_set_mode (uint8_t mode) |
HASH Set Mode. More... | |
void | hash_set_algorithm (uint8_t algorithm) |
HASH Set Algorithm. More... | |
void | hash_set_data_type (uint8_t datatype) |
HASH Set Data Type. More... | |
void | hash_set_key_length (uint8_t keylength) |
HASH Set Key Length. More... | |
void | hash_set_last_word_valid_bits (uint8_t validbits) |
HASH Set Last Word Valid Bits. More... | |
void | hash_init (void) |
HASH Init. More... | |
void | hash_add_data (uint32_t data) |
HASH Add data. More... | |
void | hash_digest (void) |
HASH Digest. More... | |
void | hash_get_result (uint32_t *data) |
HASH Get Hash Result. More... | |