A library for a decentralised peer-to-peer chat over IPv6 only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lc6_crypto.h 994B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef LC6_SSL_H
  2. #define LC6_SSL_H
  3. #include "../inc/lc6_common.h"
  4. int lc6crypto_init(void);
  5. int lc6crypto_encrypt(
  6. const unsigned char *data,
  7. const int data_len,
  8. const unsigned char *skey,
  9. const unsigned char *dkey,
  10. unsigned char **enc_data,
  11. unsigned char **nonce);
  12. int lc6crypto_decrypt(
  13. const unsigned char *enc_data,
  14. const int enc_len,
  15. const unsigned char *skey,
  16. const unsigned char *dkey,
  17. unsigned char **data,
  18. const unsigned char *nonce);
  19. int lc6crypto_readfile(
  20. const char *file,
  21. const unsigned char *password,
  22. unsigned char **data,
  23. int *data_len);
  24. int lc6crypto_writefile(
  25. const char *file,
  26. const unsigned char *password,
  27. const unsigned char *data,
  28. const int data_len);
  29. LC6_USER* lc6crypto_genuserkey(LC6_USER*);
  30. unsigned char* lc6crypto_hash(unsigned char*, int);
  31. void lc6crypto_random(unsigned char*, int);
  32. #endif