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.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef LC6_SSL_H
  2. #define LC6_SSL_H
  3. #include "../inc/lc6_common.h"
  4. int lc6crypto_init(void);
  5. int lc6crypto_public_encrypt(
  6. const unsigned char *data,
  7. const int data_len,
  8. const unsigned char *priv,
  9. const unsigned char *pub,
  10. unsigned char **enc_data,
  11. unsigned char **nonce);
  12. int lc6crypto_private_decrypt(
  13. const unsigned char *enc_data,
  14. const int enc_len,
  15. const unsigned char *priv,
  16. const unsigned char *pub,
  17. unsigned char **data,
  18. const unsigned char *nonce);
  19. int lc6crypto_private_encrypt(
  20. const unsigned char *data,
  21. const int data_len,
  22. const unsigned char *priv,
  23. const unsigned char *pub,
  24. unsigned char **enc_data,
  25. unsigned char **nonce);
  26. int lc6crypto_public_decrypt(
  27. const unsigned char *enc_data,
  28. const int enc_len,
  29. const unsigned char *priv,
  30. const unsigned char *pub,
  31. unsigned char **data,
  32. const unsigned char *nonce);
  33. int lc6crypto_readfile(
  34. const char *file,
  35. const unsigned char *password,
  36. unsigned char **data,
  37. int *data_len);
  38. int lc6crypto_writefile(
  39. const char *file,
  40. const unsigned char *password,
  41. const unsigned char *data,
  42. const int data_len);
  43. LC6_USER* lc6crypto_genuserkey(LC6_USER*);
  44. unsigned char* lc6crypto_hash(unsigned char*, int);
  45. void lc6crypto_random(unsigned char*, int);
  46. #endif