crypt_path.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * \file crypt_path.h
  3. * \brief Header file for crypt_path.c.
  4. **/
  5. #ifndef CRYPT_PATH_H
  6. #define CRYPT_PATH_H
  7. crypt_path_t *crypt_path_new(void);
  8. void cpath_assert_layer_ok(const crypt_path_t *cp);
  9. void cpath_assert_ok(const crypt_path_t *cp);
  10. int cpath_append_hop(crypt_path_t **head_ptr, extend_info_t *choice);
  11. int cpath_init_circuit_crypto(crypt_path_t *cpath,
  12. const char *key_data, size_t key_data_len,
  13. int reverse, int is_hs_v3);
  14. void
  15. cpath_free(crypt_path_t *victim);
  16. void cpath_extend_linked_list(crypt_path_t **head_ptr, crypt_path_t *new_hop);
  17. void
  18. cpath_crypt_cell(const crypt_path_t *cpath, uint8_t *payload, bool is_decrypt);
  19. struct crypto_digest_t *
  20. cpath_get_incoming_digest(const crypt_path_t *cpath);
  21. void
  22. cpath_set_cell_forward_digest(crypt_path_t *cpath, cell_t *cell);
  23. crypt_path_t *cpath_get_next_non_open_hop(crypt_path_t *cpath);
  24. #if defined(TOR_UNIT_TESTS)
  25. unsigned int cpath_get_n_hops(crypt_path_t **head_ptr);
  26. #endif /* defined(TOR_UNIT_TESTS) */
  27. #endif