/* 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 */