This change:

- Avoids the use of up_aesinitialize() entirely, which resolves dependency problems, because this function does not make sure that an actual hardware aes implementation was made available: each SoC is now responsible to ensure the AES hardware is initialized before first use. This applies to lpc43xx, stm32 and sam34.
    - Remove definitions of the NEVER used aes_init and aes_update operations. The new AES API will be more suitable.
    - Change the unusual naming in stm32 (avoiding possible naming clashes)
    - Change the unusual naming in sam34 (avoiding possible naming clashes)
    - Add some FAR to pointers and enforce the 80 col limit in stm32 and sam
This commit is contained in:
Sebastien Lorquet
2018-12-19 08:33:08 -06:00
committed by Gregory Nutt
parent 08b9b3e230
commit a7257eff52
6 changed files with 214 additions and 200 deletions
+7 -10
View File
@@ -65,9 +65,9 @@
#define CYPHER_ENCRYPT 1
#define CYPHER_DECRYPT 0
/************************************************************************************
/*******************************************************************************
* Public Data
************************************************************************************/
******************************************************************************/
#ifndef __ASSEMBLY__
@@ -80,19 +80,16 @@ extern "C"
#define EXTERN extern
#endif
/************************************************************************************
/*******************************************************************************
* Public Function Prototypes
************************************************************************************/
******************************************************************************/
int up_cryptoinitialize(void);
#if defined(CONFIG_CRYPTO_AES)
int up_aesinitialize(void);
int aes_cypher(FAR void *out, FAR const void *in, uint32_t size, FAR const void *iv,
FAR const void *key, uint32_t keysize, int mode, int encrypt);
int aes_init(FAR const void *iv, FAR const void *key, uint32_t keysize, int mode,
int encrypt);
int aes_update(FAR const void *out, uint32_t *outl, FAR const void *in, uint32_t inl);
int aes_cypher(FAR void *out, FAR const void *in, uint32_t size,
FAR const void *iv, FAR const void *key, uint32_t keysize,
int mode, int encrypt);
#endif
#if defined(CONFIG_CRYPTO_ALGTEST)