fix: missmatch between declaration and definition

This commit is contained in:
sudden6 2022-12-08 12:45:53 +01:00
parent 3fa85e5322
commit 26ce30d852
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

View File

@ -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);
} }