Add crypto

This commit is contained in:
PolynomialDivision 2017-08-13 22:42:34 +02:00
parent 1271a50eaf
commit 57209931db
9 changed files with 251 additions and 8 deletions

10
src/include/crypto.h Normal file
View file

@ -0,0 +1,10 @@
#ifndef DAWN_CRYPTO_H
#define DAWN_CRYPTO_H
#include <stdlib.h>
void gcrypt_init();
void gcrypt_set_key_and_iv(char *key, char *iv);
char* gcrypt_encrypt_msg(char* msg, size_t msg_length);
char* gcrypt_decrypt_msg(char* msg, size_t msg_length);
#endif //DAWN_CRYPTO_H

View file

@ -7,6 +7,7 @@ pthread_mutex_t send_mutex;
int init_socket_runopts(char *_ip, char *_port, int broadcast_socket);
int send_string(char *msg);
int send_string_enc(char *msg);
void close_socket();
#endif