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.

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