2
0

bzero is nonstandard. Replace with memset_s.

This commit is contained in:
Maarten Billemont
2017-09-24 13:14:16 -04:00
parent 0a024b2594
commit fafe56166e
5 changed files with 16 additions and 15 deletions

View File

@@ -487,7 +487,7 @@ void AES_ECB_encrypt(uint8_t *output, const uint8_t *input, const uint32_t lengt
// The next function call encrypts the PlainText with the Key using AES algorithm.
Cipher();
bzero( RoundKey, keyExpSize );
memset_s( RoundKey, keyExpSize, 0, keyExpSize );
}
void AES_ECB_decrypt(uint8_t *output, const uint8_t *input, const uint32_t length, const uint8_t *key)
@@ -502,7 +502,7 @@ void AES_ECB_decrypt(uint8_t *output, const uint8_t *input, const uint32_t lengt
InvCipher();
bzero( RoundKey, keyExpSize );
memset_s( RoundKey, keyExpSize, 0, keyExpSize );
}
@@ -560,7 +560,7 @@ void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co
Cipher();
}
bzero( RoundKey, keyExpSize );
memset_s( RoundKey, keyExpSize, 0, keyExpSize );
}
void AES_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, const uint8_t* key, const uint8_t* iv)
@@ -599,7 +599,7 @@ void AES_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co
InvCipher();
}
bzero( RoundKey, keyExpSize );
memset_s( RoundKey, keyExpSize, 0, keyExpSize );
}
#endif // #if defined(AES_CBC) && (AES_CBC == 1)