1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00

Fix some compiler warnings

This commit is contained in:
Rhys Weatherley 2016-03-16 19:19:11 +10:00
parent f5dc64aa7c
commit 8cd6916fe8
4 changed files with 3 additions and 2 deletions

View File

@ -99,6 +99,7 @@ bool ChaChaPoly::setIV(const uint8_t *iv, size_t len)
state.dataSize = 0;
state.dataStarted = false;
state.ivSize = len;
return true;
}
void ChaChaPoly::encrypt(uint8_t *output, const uint8_t *input, size_t len)

View File

@ -256,7 +256,6 @@ void Ed25519::generatePrivateKey(uint8_t privateKey[32])
void Ed25519::derivePublicKey(uint8_t publicKey[32], const uint8_t privateKey[32])
{
SHA512 hash;
uint8_t *buf = (uint8_t *)(hash.state.w);
limb_t a[NUM_LIMBS_256BIT];
Point ptA;

View File

@ -122,6 +122,7 @@ bool GCMCommon::setIV(const uint8_t *iv, size_t len)
// This value will be XOR'ed with the final authentication hash
// value in computeTag().
blockCipher->encryptBlock(state.nonce, state.counter);
return true;
}
/**

View File

@ -171,8 +171,8 @@ void Hash::formatHMACKey(void *block, const void *key, size_t len, uint8_t pad)
finalize(block, len);
reset();
}
memset(block + len, pad, size - len);
uint8_t *b = (uint8_t *)block;
memset(b + len, pad, size - len);
while (len > 0) {
*b++ ^= pad;
--len;