mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-14 21:21:56 +00:00
The switch from C99 integer types to u16_t, etc. caused misalignment in structs and function definitions with multi-line parameter lists. Change-Id: I1448b159ab1afe50ff88b7a6bd1b254c44858d4c Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
35 lines
907 B
C
35 lines
907 B
C
/*
|
|
* Copyright (c) 2016 Nordic Semiconductor ASA
|
|
* Copyright (c) 2016 Vinayak Kariappa Chettimada
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
#ifndef _ECB_H_
|
|
#define _ECB_H_
|
|
|
|
typedef void (*ecb_fp) (u32_t status, u8_t *cipher_be, void *context);
|
|
|
|
struct ecb {
|
|
u8_t in_key_be[16];
|
|
u8_t in_clear_text_be[16];
|
|
u8_t out_cipher_text_be[16];
|
|
/* if not null reverse copy into in_key_be */
|
|
u8_t *in_key_le;
|
|
/* if not null reverse copy into in_clear_text_be */
|
|
u8_t *in_clear_text_le;
|
|
ecb_fp fp_ecb;
|
|
void *context;
|
|
};
|
|
|
|
void ecb_encrypt_be(u8_t const *const key_be, u8_t const *const clear_text_be,
|
|
u8_t * const cipher_text_be);
|
|
void ecb_encrypt(u8_t const *const key_le, u8_t const *const clear_text_le,
|
|
u8_t * const cipher_text_le, u8_t * const cipher_text_be);
|
|
u32_t ecb_encrypt_nonblocking(struct ecb *ecb);
|
|
void isr_ecb(void *param);
|
|
|
|
u32_t ecb_ut(void);
|
|
|
|
#endif /* _ECB_H_ */
|