|
ascii-chat 0.6.0
Real-time terminal-based video chat with ASCII art conversion
|
Session string generation for discovery service. More...
Go to the source code of this file.
Functions | |
| asciichat_error_t | acds_string_generate (char *output, size_t output_size) |
| Generate random session string. | |
| bool | acds_string_validate (const char *str) |
| Validate session string format. | |
| asciichat_error_t | acds_string_init (void) |
| Initialize random number generator for string generation. | |
Session string generation for discovery service.
Generates memorable session strings in the format: adjective-noun-noun Example: "swift-river-mountain", "quiet-forest-peak"
This is a minimal inline implementation with embedded wordlists. Future lib/discovery/session_string.c will load from files for larger wordlists.
Definition in file strings.h.
| asciichat_error_t acds_string_generate | ( | char * | output, |
| size_t | output_size | ||
| ) |
Generate random session string.
| output | Output buffer for session string |
| output_size | Size of output buffer (should be at least 48 bytes) |
Generates strings in format: adjective-noun-noun Example: "swift-river-mountain" (20 characters)
Entropy: ~100 adjectives * 100 nouns * 100 nouns = 1 million combinations (Full wordlist version will have ~10 million combinations)
Definition at line 55 of file strings.c.
References ASCIICHAT_OK, ERROR_BUFFER_OVERFLOW, ERROR_INVALID_PARAM, log_debug, and SET_ERRNO.
Referenced by session_create().
| asciichat_error_t acds_string_init | ( | void | ) |
Initialize random number generator for string generation.
Must be called before acds_string_generate(). Uses libsodium's randombytes for cryptographically secure randomness.
Definition at line 44 of file strings.c.
References ASCIICHAT_OK, ERROR_CRYPTO_INIT, log_debug, and SET_ERRNO.
Referenced by main().
| bool acds_string_validate | ( | const char * | str | ) |
Validate session string format.
| str | Session string to validate |
Valid format:
Definition at line 80 of file strings.c.
Referenced by session_create().