1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "stdafx.h"
/* ENCRYPTION FUNCTIONS */
bool tox_pass_decrypt(const uint8_t *data, size_t length, const uint8_t *passphrase, size_t pplength, uint8_t *out, TOX_ERR_DECRYPTION *error)
{
return CreateFunction<bool(*)(const uint8_t *, size_t, const uint8_t*, size_t, uint8_t*, TOX_ERR_DECRYPTION*)>(__FUNCTION__)(data, length, passphrase, pplength, out, error);
}
bool tox_pass_encrypt(const uint8_t *data, size_t data_len, const uint8_t *passphrase, size_t pplength, uint8_t *out, TOX_ERR_ENCRYPTION *error)
{
return CreateFunction<bool(*)(const uint8_t *, size_t, const uint8_t*, size_t, uint8_t*, TOX_ERR_ENCRYPTION*)>(__FUNCTION__)(data, data_len, passphrase, pplength, out, error);
}
bool tox_is_data_encrypted(const uint8_t *data)
{
return CreateFunction<bool(*)(const uint8_t*)>(__FUNCTION__)(data);
}
|