mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
author Ian Clowes <clowes_ian@hotmail.com> 1590603904 +0100 committer Ian Clowes <clowes_ian@hotmail.com> 1594246123 +0100 datastorage (bug fix): deleting expired array item would fail to test next item test_storage: extended to cover all required datastorage entry points test_storage: added ability to read script file test_storage: added new and revised test scripts TESTING.md: added to describe testing approach general: added various TODO notes on things to come back to general: revised #includes to make each "self-compiling" general: revised #includes to minimise usage across source files general: moved declarations and defintions to simplify and rationalise code datastorage: refactor to support scalability testing datastorage: made independent of time() calls to support testing datastorage: fixed redundant use of both SORT_NUM and SORT_LENGTH defines datastorage: fake kicking to test clients move between access points msghandler: new module to reduce compile time interdependencies mshhandler: (issue #100?) fixed SEGV memcpy() in dump_client() using strncpy() ubus: merged uface into ubus mac_utils: new module for MAC address utilites test_header: added target to help #include rationalisation
38 lines
768 B
C
38 lines
768 B
C
#ifndef DAWN_CRYPTO_H
|
|
#define DAWN_CRYPTO_H
|
|
|
|
#include <stddef.h>
|
|
|
|
/**
|
|
* Initialize gcrypt.
|
|
* Has to be called before using the other functions!
|
|
*/
|
|
void gcrypt_init();
|
|
|
|
/**
|
|
* Set the Key and the iv.
|
|
* @param key
|
|
* @param iv
|
|
*/
|
|
void gcrypt_set_key_and_iv(const char *key, const char *iv);
|
|
|
|
/**
|
|
* Function that encrypts the message.
|
|
* Free the string after using it!
|
|
* @param msg
|
|
* @param msg_length
|
|
* @param out_length
|
|
* @return the encrypted string.
|
|
*/
|
|
char *gcrypt_encrypt_msg(char *msg, size_t msg_length, int *out_length);
|
|
|
|
/**
|
|
* FUnction that decrypts a message.
|
|
* Free the string after using it!
|
|
* @param msg
|
|
* @param msg_length
|
|
* @return the decrypted string.
|
|
*/
|
|
char *gcrypt_decrypt_msg(char *msg, size_t msg_length);
|
|
|
|
#endif //DAWN_CRYPTO_H
|