bzero is nonstandard. Replace with memset_s.
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user