2021-04-07 20:10:43 +02:00
|
|
|
#ifndef UTIL_TOKEN_H
|
|
|
|
#define UTIL_TOKEN_H
|
|
|
|
|
|
|
|
#include <stdbool.h>
|
|
|
|
|
2023-10-06 16:10:29 +02:00
|
|
|
/**
|
|
|
|
* Number of bytes used by a token, including the terminating zero byte.
|
|
|
|
*/
|
2023-10-06 16:08:28 +02:00
|
|
|
#define TOKEN_SIZE 33
|
|
|
|
|
2023-10-06 16:10:29 +02:00
|
|
|
/**
|
|
|
|
* Generate a random token string.
|
|
|
|
*/
|
2023-10-06 16:08:28 +02:00
|
|
|
bool generate_token(char out[static TOKEN_SIZE]);
|
2021-04-07 20:10:43 +02:00
|
|
|
|
|
|
|
#endif
|