Host Token File Format#

The sl_zigbee_af_trust_center_backup_save_tokens_to_file API uses the following format to store all the tokens read from the operational NCP in a binary file.

// The binary file format to save the tokens are
//
// Number of Tokens (1 byte)
// Token0 (4 bytes) Token0Size(1 byte) Token0ArraySize(1 byte) Token0Data(Token0Size * Token0ArraySize)
// :
// :
// TokenM (4 bytes) TokenMSize(1 byte) TokenMArraySize(1 byte) TokenMData(TokenMSize * TokenMArraySize)
//

Similarly, the function sl_zigbee_af_trust_center_backup_restore_tokens_from_file reads the same file in the same format order and writes the tokens to the NCP.