Security salts and hashes

As an optional security feature, the TeamSpeak SDK offers to restrict access of clients to specific channels by using a salt and hash mechanism. The motivation here is to enforce clients to use a specific identity, nickname and metadata when they connect to the TeamSpeak server.

In the server, a security salt is created over a clients unique data by calling ts3server_createSecuritySalt. This created salt is then attached to a channel during channel creation or by editing existing channels by setting the channel variable CHANNEL_SECURITY_SALT. When this channel variable is set, when a client enters the channel, the clients CLIENT_SECURITY_HASH variable is checked against the clients data (unique id, optionally nickname and meta_data) using the salt. If the hash is not correct, the client is not allowed to enter the channel.

The clients hash value is calculated by the server calling ts3server_calculateSecurityHash. This security hash has to be transmitted to the client by ways outside of the TeamSpeak SDK. The client will set the hash in its CLIENT_SECURITY_HASH variable.


To create a security salt for the channel, call:

unsigned int ts3server_createSecuritySalt(options,  
 salt,  
 saltByteSize,  
 securitySalt); 
int options;
void* salt;
int saltByteSize;
char** securitySalt;
 


To create a security hash for a client, call:

unsigned int ts3server_calculateSecurityHash(securitySalt,  
 clientUniqueIdentifier,  
 clientNickName,  
 clientMetaData,  
 securityHash); 
const char* securitySalt;
const char* clientUniqueIdentifier;
const char* clientNickName;
const char* clientMetaData;
char** securityHash;