renamed why2_chat_generate_keys to why2_chat_init_keys

I think the name is much more self-explanatory now
This commit is contained in:
Václav Šmejkal 2024-04-13 12:22:36 +02:00
parent abd8645ab0
commit ef1f9bbf38
Signed by: ENGO150
GPG Key ID: 4A57E86482968843
3 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ extern "C" {
#define WHY2_CHAT_PRI_KEY "pri" #define WHY2_CHAT_PRI_KEY "pri"
#define WHY2_CHAT_KEY_BASE 62 //BASE IN THE GENERATED KEYS ARE STORED IN WHY2_CHAT_KEY_LOCATION #define WHY2_CHAT_KEY_BASE 62 //BASE IN THE GENERATED KEYS ARE STORED IN WHY2_CHAT_KEY_LOCATION
void why2_chat_generate_keys(void); //GENERATE RSA KEYS void why2_chat_init_keys(void); //INIT (POSSIBLY GENERATE) RSA KEYS
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -53,7 +53,7 @@ void generate_prime(mpz_t x)
} }
//GLOBAL //GLOBAL
void why2_chat_generate_keys(void) void why2_chat_init_keys(void)
{ {
//GET PATH TO KEY DIR //GET PATH TO KEY DIR
char *path = why2_replace(WHY2_CHAT_KEY_LOCATION, "{USER}", getenv("USER")); char *path = why2_replace(WHY2_CHAT_KEY_LOCATION, "{USER}", getenv("USER"));

View File

@ -36,7 +36,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
int main(void) int main(void)
{ {
why2_chat_init_client_config(); //CREATE client.toml CONFIGURATION why2_chat_init_client_config(); //CREATE client.toml CONFIGURATION
why2_chat_generate_keys(); //CREATE RSA KEYS why2_chat_init_keys(); //CREATE RSA KEYS
int listen_socket = socket(AF_INET, SOCK_STREAM, 0); //CREATE SERVER SOCKET int listen_socket = socket(AF_INET, SOCK_STREAM, 0); //CREATE SERVER SOCKET
char *line = NULL; char *line = NULL;