From accdbc780617a4f4b30790ffb25ab1d26652c315 Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 27 May 2019 21:40:41 +0200 Subject: First public release --- src/inexact.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/inexact.h (limited to 'src/inexact.h') diff --git a/src/inexact.h b/src/inexact.h new file mode 100644 index 0000000..f579704 --- /dev/null +++ b/src/inexact.h @@ -0,0 +1,40 @@ +/* Inexact source code package. + * + * Written in 2019 by . + * + * To the extent possible under law, the author have dedicated all copyright + * and related and neighboring rights to this software to the public domain + * worldwide. This software is distributed without any warranty. + * + * You should have received a copy of the CC0 Public Domain Dedication along with + * this software. If not, see . + */ + +#ifndef INEXACT_H +#define INEXACT_H + +#include + +int generate_keys(const char *seckey_filename, const char *pubkey_filename, + int no_password); +int get_seckey(const char *keyfile, unsigned char *skey, unsigned char *pkey); +int get_pubkey(const char *keyfile, unsigned char *pkey); +int get_symmetrickeys(unsigned char *salt_out, unsigned char *seckey_out, + unsigned char *pubkey_out); +int check_get_symmetrickeys(const unsigned char *data, const size_t data_len, + unsigned char *seckey_out, + unsigned char *pubkey_out); +unsigned char *encrypt_data(const unsigned char *seckey, + const unsigned char *pubkey, + const unsigned char *salt, + const unsigned char *data, size_t data_len, + size_t nonce1_len, size_t tag1_len, + int base64_transformation, size_t *encrypted_len); + +unsigned char *decrypt_data(const unsigned char *seckey, + const unsigned char *pubkey, + const unsigned char *data, size_t data_len, + int symmetric_flag, size_t *data_len_out); + +#endif /* INEXACT_H */ + -- cgit v1.2.3