#ifndef LC6_SSL_H #define LC6_SSL_H #include #include "../inc/lc6_common.h" int lc6crypto_init(void); int lc6crypto_encrypt( const unsigned char *data, const int data_len, const unsigned char *skey, const unsigned char *dkey, unsigned char **enc_data, unsigned char **nonce); int lc6crypto_decrypt( const unsigned char *enc_data, const int enc_len, const unsigned char *skey, const unsigned char *dkey, unsigned char **data, const unsigned char *nonce); int lc6crypto_readfile( const char *file, const unsigned char *password, unsigned char **data, int *data_len); int lc6crypto_writefile( const char *file, const unsigned char *password, const unsigned char *data, const int data_len); LC6_USER* lc6crypto_genuserkey(LC6_USER*); unsigned char* lc6crypto_hash(unsigned char*, int); void lc6crypto_random(unsigned char*, int); #define LC6_CRYPTO_HASHLEN crypto_generichash_BYTES #define LC6_CRYPTO_HASHSIGNLEN (crypto_secretbox_NONCEBYTES+crypto_box_MACBYTES+crypto_generichash_BYTES) #endif