Refactor signing backend (#690)

Cleaned up the AES driver and removed some cppcheck isues
in the process.
This commit is contained in:
Patrick Fallberg
2016-12-25 16:12:40 +01:00
committed by Henrik Ekblad
parent 61e6cecb3f
commit 1040fbebc5
27 changed files with 398 additions and 14004 deletions
+1 -1
View File
@@ -121,4 +121,4 @@ void receive(const MyMessage &message)
Serial.println(message.getBool());
}
}
/** @}*/
/** @}*/
@@ -261,7 +261,6 @@ uint8_t atsha204Class::sha204p_resync(uint8_t size, uint8_t *response)
uint8_t atsha204Class::sha204p_receive_response(uint8_t size, uint8_t *response)
{
uint8_t count_byte;
uint8_t i;
uint8_t ret_code;
@@ -273,6 +272,7 @@ uint8_t atsha204Class::sha204p_receive_response(uint8_t size, uint8_t *response)
ret_code = swi_receive_bytes(size, response);
if (ret_code == SWI_FUNCTION_RETCODE_SUCCESS || ret_code == SWI_FUNCTION_RETCODE_RX_FAIL) {
uint8_t count_byte;
count_byte = response[SHA204_BUFFER_POS_COUNT];
if ((count_byte < SHA204_RSP_SIZE_MIN) || (count_byte > size)) {
return SHA204_INVALID_SIZE;
@@ -326,7 +326,7 @@ public:
*
* @param[in] pin The pin to use for communication
*/
atsha204Class(uint8_t pin);
explicit atsha204Class(uint8_t pin);
/**
* @brief Wake up device