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
+10
View File
@@ -32,6 +32,16 @@ const uint8_t sha256InitState[] PROGMEM = {
0x19,0xcd,0xe0,0x5b // H7
};
Sha256Class::Sha256Class()
{
memset(keyBuffer, 0, BLOCK_LENGTH);
memset(innerHash, 0, HASH_LENGTH);
memset(buffer.b, 0, BLOCK_LENGTH);
memset(state.b, 0, BLOCK_LENGTH);
bufferOffset = 0;
byteCount = 0;
}
void Sha256Class::init(void)
{
memcpy_P(state.b,sha256InitState,32);