crypto: change type uint32_t to size_t in aes_cypher() arguments.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
This commit is contained in:
wangbowen6 2022-05-12 21:03:54 +08:00 committed by Xiang Xiao
parent 568621fbcf
commit bc61e71b94
7 changed files with 14 additions and 14 deletions

View File

@ -161,8 +161,8 @@ static int aes_update(const void *out,
* Public Functions * Public Functions
****************************************************************************/ ****************************************************************************/
int aes_cypher(void *out, const void *in, uint32_t size, const void *iv, int aes_cypher(void *out, const void *in, size_t size, const void *iv,
const void *key, uint32_t keysize, int mode, int encrypt) const void *key, size_t keysize, int mode, int encrypt)
{ {
unsigned int ret = 0; unsigned int ret = 0;
uint32_t outl = size; uint32_t outl = size;

View File

@ -175,8 +175,8 @@ static int samaes_initialize(void)
return OK; return OK;
} }
int aes_cypher(void *out, const void *in, uint32_t size, int aes_cypher(void *out, const void *in, size_t size,
const void *iv, const void *key, uint32_t keysize, const void *iv, const void *key, size_t keysize,
int mode, int encrypt) int mode, int encrypt)
{ {
int ret = OK; int ret = OK;

View File

@ -257,8 +257,8 @@ int stm32_aesuninitialize(void)
return OK; return OK;
} }
int aes_cypher(void *out, const void *in, uint32_t size, int aes_cypher(void *out, const void *in, size_t size,
const void *iv, const void *key, uint32_t keysize, const void *iv, const void *key, size_t keysize,
int mode, int encrypt) int mode, int encrypt)
{ {
int ret = OK; int ret = OK;

View File

@ -257,8 +257,8 @@ int stm32_aesuninitialize(void)
return OK; return OK;
} }
int aes_cypher(void *out, const void *in, uint32_t size, int aes_cypher(void *out, const void *in, size_t size,
const void *iv, const void *key, uint32_t keysize, const void *iv, const void *key, size_t keysize,
int mode, int encrypt) int mode, int encrypt)
{ {
int ret = OK; int ret = OK;

View File

@ -587,8 +587,8 @@ int esp32c3_aes_init(void)
#ifdef CONFIG_CRYPTO_AES #ifdef CONFIG_CRYPTO_AES
int aes_cypher(void *out, const void *in, uint32_t size, int aes_cypher(void *out, const void *in, size_t size,
const void *iv, const void *key, uint32_t keysize, const void *iv, const void *key, size_t keysize,
int mode, int encrypt) int mode, int encrypt)
{ {
int ret; int ret;

View File

@ -580,8 +580,8 @@ int esp32_aes_init(void)
#ifdef CONFIG_CRYPTO_AES #ifdef CONFIG_CRYPTO_AES
int aes_cypher(void *out, const void *in, uint32_t size, int aes_cypher(void *out, const void *in, size_t size,
const void *iv, const void *key, uint32_t keysize, const void *iv, const void *key, size_t keysize,
int mode, int encrypt) int mode, int encrypt)
{ {
int ret; int ret;

View File

@ -73,8 +73,8 @@ extern "C"
int up_cryptoinitialize(void); int up_cryptoinitialize(void);
#if defined(CONFIG_CRYPTO_AES) #if defined(CONFIG_CRYPTO_AES)
int aes_cypher(FAR void *out, FAR const void *in, uint32_t size, int aes_cypher(FAR void *out, FAR const void *in, size_t size,
FAR const void *iv, FAR const void *key, uint32_t keysize, FAR const void *iv, FAR const void *key, size_t keysize,
int mode, int encrypt); int mode, int encrypt);
#endif #endif