From f1f8a71bd4df7f239e28a9625b82ee02428c3f3f Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Sat, 3 Jan 2015 08:12:27 +0000 Subject: Tox: work commit - removed *.lib and lib generator - disabled profile encryption and import - loading tox profile on connection - project reordering - http proxy support git-svn-id: http://svn.miranda-ng.org/main/trunk@11730 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/api_encryption.cpp | 88 ++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 protocols/Tox/src/api_encryption.cpp (limited to 'protocols/Tox/src/api_encryption.cpp') diff --git a/protocols/Tox/src/api_encryption.cpp b/protocols/Tox/src/api_encryption.cpp new file mode 100644 index 0000000000..7125743096 --- /dev/null +++ b/protocols/Tox/src/api_encryption.cpp @@ -0,0 +1,88 @@ +#include "common.h" + +/* ENCRYPTION FUNCTIONS */ + +int tox_pass_encryption_extra_length() +{ + return CreateFunction(__FUNCTION__)(); +} + +int tox_pass_key_length() +{ + return CreateFunction(__FUNCTION__)(); +} + +int tox_pass_salt_length() +{ + return CreateFunction(__FUNCTION__)(); +} + +uint32_t tox_encrypted_size(const Tox *tox) +{ + return CreateFunction(__FUNCTION__)(tox); +} + +int tox_pass_encrypt(const uint8_t *data, uint32_t data_len, uint8_t *passphrase, uint32_t pplength, uint8_t *out) +{ + return CreateFunction(__FUNCTION__)(data, data_len, passphrase, pplength, out); +} + +int tox_encrypted_save(const Tox *tox, uint8_t *data, uint8_t *passphrase, uint32_t pplength) +{ + return CreateFunction(__FUNCTION__)(tox, data, passphrase, pplength); +} + +int tox_pass_decrypt(const uint8_t *data, uint32_t length, uint8_t *passphrase, uint32_t pplength, uint8_t *out) +{ + return CreateFunction(__FUNCTION__)(data, length, passphrase, pplength, out); +} + +int tox_encrypted_load(Tox *tox, const uint8_t *data, uint32_t length, uint8_t *passphrase, uint32_t pplength) +{ + return CreateFunction(__FUNCTION__)(tox, data, length, passphrase, pplength); +} + +int tox_derive_key_from_pass(uint8_t *passphrase, uint32_t pplength, uint8_t *out_key) +{ + return CreateFunction(__FUNCTION__)(passphrase, pplength, out_key); +} + +int tox_derive_key_with_salt(uint8_t *passphrase, uint32_t pplength, uint8_t *salt, uint8_t *out_key) +{ + return CreateFunction(__FUNCTION__)(passphrase, pplength, salt, out_key); +} + +int tox_get_salt(uint8_t *data, uint8_t *salt) +{ + return CreateFunction(__FUNCTION__)(data, salt); +} + +int tox_pass_key_encrypt(const uint8_t *data, uint32_t data_len, const uint8_t *key, uint8_t *out) +{ + return CreateFunction(__FUNCTION__)(data, data_len, key, out); +} + +int tox_encrypted_key_save(const Tox *tox, uint8_t *data, uint8_t *key) +{ + return CreateFunction(__FUNCTION__)(tox, data, key); +} + +int tox_pass_key_decrypt(const uint8_t *data, uint32_t length, const uint8_t *key, uint8_t *out) +{ + return CreateFunction(__FUNCTION__)(data, length, key, out); +} + +int tox_encrypted_key_load(Tox *tox, const uint8_t *data, uint32_t length, uint8_t *key) +{ + return CreateFunction(__FUNCTION__)(tox, data, length, key); +} + +int tox_is_data_encrypted(const uint8_t *data) +{ + return CreateFunction(__FUNCTION__)(data); +} + +int tox_is_save_encrypted(const uint8_t *data) +{ + return CreateFunction(__FUNCTION__)(data); +} \ No newline at end of file -- cgit v1.2.3