diff options
Diffstat (limited to 'toxcore/crypto_core.h')
-rw-r--r-- | toxcore/crypto_core.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/toxcore/crypto_core.h b/toxcore/crypto_core.h index 814c4362..7362d49e 100644 --- a/toxcore/crypto_core.h +++ b/toxcore/crypto_core.h | |||
@@ -53,6 +53,13 @@ int crypto_cmp(const uint8_t *mem1, const uint8_t *mem2, uint32_t length); | |||
53 | uint32_t random_int(void); | 53 | uint32_t random_int(void); |
54 | uint64_t random_64b(void); | 54 | uint64_t random_64b(void); |
55 | 55 | ||
56 | /* Check if a Tox public key crypto_box_PUBLICKEYBYTES is valid or not. | ||
57 | * This should only be used for input validation. | ||
58 | * | ||
59 | * return 0 if it isn't. | ||
60 | * return 1 if it is. | ||
61 | */ | ||
62 | int public_key_valid(const uint8_t *public_key); | ||
56 | 63 | ||
57 | /* Encrypts plain of length length to encrypted of length + 16 using the | 64 | /* Encrypts plain of length length to encrypted of length + 16 using the |
58 | * public key(32 bytes) of the receiver and the secret key of the sender and a 24 byte nonce. | 65 | * public key(32 bytes) of the receiver and the secret key of the sender and a 24 byte nonce. |