mirror of
https://github.com/Tha14/toxic.git
synced 2025-12-09 13:26:35 +01:00
Add some simple impersonation detection on friend requests
This will alert the user when the first six bytes of a new contact's public key is the same as any other contact in their list. These 6 bytes are used elsewhere in toxic for unique identification. Also did a small refactor regarding the KEY_IDENT_BYTES define
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
#define MAX_STR_SIZE TOX_MAX_MESSAGE_LENGTH /* must be >= TOX_MAX_MESSAGE_LENGTH */
|
||||
#define MAX_CMDNAME_SIZE 64
|
||||
#define TOXIC_MAX_NAME_LENGTH 32 /* Must be <= TOX_MAX_NAME_LENGTH */
|
||||
#define KEY_IDENT_DIGITS 3 /* number of hex digits to display for the pub-key based identifier */
|
||||
#define KEY_IDENT_BYTES 6 /* number of hex digits to display for the public key identifier */
|
||||
#define TIME_STR_SIZE 32
|
||||
#define COLOR_STR_SIZE 10 /* should fit every color option */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user