common.h 793 B

12345678910111213141516171819202122232425
  1. #define SECRET_LEN 64
  2. #define PUBLIC_LEN 32
  3. #define SEED_LEN 32
  4. // with checksum + version num
  5. #define PUBONION_LEN (PUBLIC_LEN + 3)
  6. #define PKPREFIX_SIZE (29 + 3)
  7. #define SKPREFIX_SIZE (29 + 3)
  8. extern const char * const pkprefix;
  9. extern const char * const skprefix;
  10. #define FORMATTED_PUBLIC_LEN (PKPREFIX_SIZE + PUBLIC_LEN)
  11. #define FORMATTED_SECRET_LEN (SKPREFIX_SIZE + SECRET_LEN)
  12. // full onion address, WITHOUT newline or terminating nil char
  13. #define ONION_LEN 62
  14. extern pthread_mutex_t fout_mutex;
  15. extern FILE *fout;
  16. extern size_t onionendpos; // end of .onion within string
  17. extern size_t direndpos; // end of dir before .onion within string
  18. extern size_t printstartpos; // where to start printing from
  19. extern size_t printlen; // precalculated, related to printstartpos