mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
fix: missmatch between declaration and definition
This commit is contained in:
parent
3fa85e5322
commit
26ce30d852
|
@ -176,7 +176,7 @@ bool crypto_memunlock(void *data, size_t length)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool pk_equal(const uint8_t *pk1, const uint8_t *pk2)
|
bool pk_equal(const uint8_t pk1[CRYPTO_PUBLIC_KEY_SIZE], const uint8_t pk2[CRYPTO_PUBLIC_KEY_SIZE])
|
||||||
{
|
{
|
||||||
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||||
// Hope that this is better for the fuzzer
|
// Hope that this is better for the fuzzer
|
||||||
|
@ -186,7 +186,7 @@ bool pk_equal(const uint8_t *pk1, const uint8_t *pk2)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void pk_copy(uint8_t *dest, const uint8_t *src)
|
void pk_copy(uint8_t dest[CRYPTO_PUBLIC_KEY_SIZE], const uint8_t src[CRYPTO_PUBLIC_KEY_SIZE])
|
||||||
{
|
{
|
||||||
memcpy(dest, src, CRYPTO_PUBLIC_KEY_SIZE);
|
memcpy(dest, src, CRYPTO_PUBLIC_KEY_SIZE);
|
||||||
}
|
}
|
||||||
|
@ -484,7 +484,7 @@ void crypto_derive_public_key(uint8_t *public_key, const uint8_t *secret_key)
|
||||||
crypto_scalarmult_curve25519_base(public_key, secret_key);
|
crypto_scalarmult_curve25519_base(public_key, secret_key);
|
||||||
}
|
}
|
||||||
|
|
||||||
void new_hmac_key(const Random *rng, uint8_t *key)
|
void new_hmac_key(const Random *rng, uint8_t key[CRYPTO_HMAC_KEY_SIZE])
|
||||||
{
|
{
|
||||||
random_bytes(rng, key, CRYPTO_HMAC_KEY_SIZE);
|
random_bytes(rng, key, CRYPTO_HMAC_KEY_SIZE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user