Skip to content

Commit 26ce30d

Browse files
committed
fix: missmatch between declaration and definition
1 parent 3fa85e5 commit 26ce30d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

toxcore/crypto_core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ bool crypto_memunlock(void *data, size_t length)
176176
#endif
177177
}
178178

179-
bool pk_equal(const uint8_t *pk1, const uint8_t *pk2)
179+
bool pk_equal(const uint8_t pk1[CRYPTO_PUBLIC_KEY_SIZE], const uint8_t pk2[CRYPTO_PUBLIC_KEY_SIZE])
180180
{
181181
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
182182
// Hope that this is better for the fuzzer
@@ -186,7 +186,7 @@ bool pk_equal(const uint8_t *pk1, const uint8_t *pk2)
186186
#endif
187187
}
188188

189-
void pk_copy(uint8_t *dest, const uint8_t *src)
189+
void pk_copy(uint8_t dest[CRYPTO_PUBLIC_KEY_SIZE], const uint8_t src[CRYPTO_PUBLIC_KEY_SIZE])
190190
{
191191
memcpy(dest, src, CRYPTO_PUBLIC_KEY_SIZE);
192192
}
@@ -484,7 +484,7 @@ void crypto_derive_public_key(uint8_t *public_key, const uint8_t *secret_key)
484484
crypto_scalarmult_curve25519_base(public_key, secret_key);
485485
}
486486

487-
void new_hmac_key(const Random *rng, uint8_t *key)
487+
void new_hmac_key(const Random *rng, uint8_t key[CRYPTO_HMAC_KEY_SIZE])
488488
{
489489
random_bytes(rng, key, CRYPTO_HMAC_KEY_SIZE);
490490
}

0 commit comments

Comments
 (0)