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:
parent
f5dc64aa7c
commit
8cd6916fe8
@ -99,6 +99,7 @@ bool ChaChaPoly::setIV(const uint8_t *iv, size_t len)
|
|||||||
state.dataSize = 0;
|
state.dataSize = 0;
|
||||||
state.dataStarted = false;
|
state.dataStarted = false;
|
||||||
state.ivSize = len;
|
state.ivSize = len;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChaChaPoly::encrypt(uint8_t *output, const uint8_t *input, size_t len)
|
void ChaChaPoly::encrypt(uint8_t *output, const uint8_t *input, size_t len)
|
||||||
|
@ -256,7 +256,6 @@ void Ed25519::generatePrivateKey(uint8_t privateKey[32])
|
|||||||
void Ed25519::derivePublicKey(uint8_t publicKey[32], const uint8_t privateKey[32])
|
void Ed25519::derivePublicKey(uint8_t publicKey[32], const uint8_t privateKey[32])
|
||||||
{
|
{
|
||||||
SHA512 hash;
|
SHA512 hash;
|
||||||
uint8_t *buf = (uint8_t *)(hash.state.w);
|
|
||||||
limb_t a[NUM_LIMBS_256BIT];
|
limb_t a[NUM_LIMBS_256BIT];
|
||||||
Point ptA;
|
Point ptA;
|
||||||
|
|
||||||
|
@ -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
|
// This value will be XOR'ed with the final authentication hash
|
||||||
// value in computeTag().
|
// value in computeTag().
|
||||||
blockCipher->encryptBlock(state.nonce, state.counter);
|
blockCipher->encryptBlock(state.nonce, state.counter);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,8 +171,8 @@ void Hash::formatHMACKey(void *block, const void *key, size_t len, uint8_t pad)
|
|||||||
finalize(block, len);
|
finalize(block, len);
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
memset(block + len, pad, size - len);
|
|
||||||
uint8_t *b = (uint8_t *)block;
|
uint8_t *b = (uint8_t *)block;
|
||||||
|
memset(b + len, pad, size - len);
|
||||||
while (len > 0) {
|
while (len > 0) {
|
||||||
*b++ ^= pad;
|
*b++ ^= pad;
|
||||||
--len;
|
--len;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user