From c17fc040a4087c33cc5004038adc15f67aa7d9ae Mon Sep 17 00:00:00 2001 From: Alexandre Erwin Ittner Date: Thu, 25 Sep 2014 22:03:36 -0300 Subject: Update avatar documentation Update the documentation to reflect the API changes introduced by commits 21be438b2b3f7aa1b65b76a7f528eacfe5b634db and d409bad30dd1657f6b54ea5e38a4d9155f718ae1 --- toxcore/tox.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'toxcore/tox.h') diff --git a/toxcore/tox.h b/toxcore/tox.h index 61cfdf70..fc5ccafc 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -539,8 +539,8 @@ uint32_t tox_get_chatlist(const Tox *tox, int *out_list, uint32_t list_size); * function(Tox *tox, int32_t friendnumber, uint8_t format, uint8_t *hash, void *userdata) * * where 'format' is the avatar image format (see TOX_AVATAR_FORMAT) and 'hash' is the hash of - * the avatar data for caching purposes and it is exactly TOX_AVATAR_HASH_LENGTH long. If the - * image format is NONE, the hash is zeroed. + * the avatar data for caching purposes and it is exactly TOX_HASH_LENGTH long. If the image + * format is NONE, the hash is zeroed. * */ void tox_callback_avatar_info(Tox *tox, void (*function)(Tox *tox, int32_t, uint8_t, uint8_t *, void *), @@ -556,12 +556,12 @@ void tox_callback_avatar_info(Tox *tox, void (*function)(Tox *tox, int32_t, uint * * where 'format' is the avatar image format (see TOX_AVATAR_FORMAT); 'hash' is the * locally-calculated cryptographic hash of the avatar data and it is exactly - * TOX_AVATAR_HASH_LENGTH long; 'data' is the avatar image data and 'datalen' is the length + * TOX_HASH_LENGTH long; 'data' is the avatar image data and 'datalen' is the length * of such data. * * If format is NONE, 'data' is NULL, 'datalen' is zero, and the hash is zeroed. The hash is - * always validated locally with the function tox_avatar_hash and ensured to match the image - * data, so this value can be safely used to compare with cached avatars. + * always validated locally with the function tox_hash and ensured to match the image data, + * so this value can be safely used to compare with cached avatars. * * WARNING: users MUST treat all avatar image data received from another peer as untrusted and * potentially malicious. The library only ensures that the data which arrived is the same the @@ -601,7 +601,7 @@ int tox_set_avatar(Tox *tox, uint8_t format, const uint8_t *data, uint32_t lengt * buf - destination buffer to the image data. Must have at least 'maxlen' bytes; * length - destination pointer to the image data length; * maxlen - length of the destination buffer 'buf'; - * hash - destination pointer to the avatar hash (it must be exactly TOX_AVATAR_HASH_LENGTH bytes long). + * hash - destination pointer to the avatar hash (it must be exactly TOX_HASH_LENGTH bytes long). * * returns 0 on success; * returns -1 on failure. -- cgit v1.2.3