Tor 0.4.9.0-alpha-dev
Functions
nickname.c File Reference

Check and manipulate relay nicknames. More...

#include "core/or/or.h"
#include "feature/nodelist/nickname.h"

Go to the source code of this file.

Functions

int is_legal_nickname (const char *s)
 
int is_legal_nickname_or_hexdigest (const char *s)
 
int is_legal_hexdigest (const char *s)
 

Detailed Description

Check and manipulate relay nicknames.

Definition in file nickname.c.

Function Documentation

◆ is_legal_hexdigest()

int is_legal_hexdigest ( const char *  s)

Return true iff s is a valid hex-encoded identity-key digest. (That is, an optional $, followed by 40 hex characters, followed by either nothing, or = or ~ followed by a nickname, or a character other than =, ~, or a hex character.)

Definition at line 45 of file nickname.c.

Referenced by get_my_declared_family(), and is_legal_nickname_or_hexdigest().

◆ is_legal_nickname()

int is_legal_nickname ( const char *  s)

Return true iff s is a valid server nickname. (That is, a string containing between 1 and MAX_NICKNAME_LEN characters from LEGAL_NICKNAME_CHARACTERS.)

Definition at line 19 of file nickname.c.

Referenced by is_legal_hexdigest(), and is_legal_nickname_or_hexdigest().

◆ is_legal_nickname_or_hexdigest()

int is_legal_nickname_or_hexdigest ( const char *  s)

Return true iff s is a valid server nickname or hex-encoded identity-key digest.

Definition at line 31 of file nickname.c.

Referenced by get_my_declared_family().