ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
prepare.h
Go to the documentation of this file.
1#pragma once
2
3#include <ascii-chat/buffer.h>
8#include <libplatform/socket.h>
9
27
29asciichat_error_t acip_packet_plan(crypto_context_t *crypto, const socket_buffer_t *buffers, size_t count,
30 acip_packet_plan_t *plan);
31
41 void *ciphertext, size_t capacity, packet_header_t *header, size_t *length);
42
44 uint8_t **, size_t *);
46 size_t, uint8_t **, size_t *, uint64_t *);
48 uint8_t **, size_t *);
49
50asciichat_error_t acip_packet_decrypt_payload(crypto_record_t *, unsigned channel, unsigned delivery, const void *,
51 size_t, uint8_t **, size_t *, uint64_t *);
struct buffer_domain buffer_domain_t
Definition buffer.h:24
unsigned long long uint64_t
Definition common.h:63
unsigned char uint8_t
Definition common.h:60
asciichat_error_t
Error and exit codes - unified status values (0-255).
Definition error_codes.h:44
asciichat_error_t acip_packet_seal(crypto_record_t *, acip_traffic_class_t, acip_delivery_t, const void *, size_t, uint8_t **, size_t *)
Definition prepare.c:125
asciichat_error_t acip_packet_open_sequence(crypto_record_t *, acip_traffic_class_t, acip_delivery_t, const void *, size_t, uint8_t **, size_t *, uint64_t *)
Definition prepare.c:166
asciichat_error_t acip_packet_open(crypto_record_t *, acip_traffic_class_t, acip_delivery_t, const void *, size_t, uint8_t **, size_t *)
Definition prepare.c:183
asciichat_error_t acip_packet_plan(crypto_context_t *crypto, const socket_buffer_t *buffers, size_t count, acip_packet_plan_t *plan)
Definition prepare.c:9
asciichat_error_t acip_packet_encrypt(crypto_context_t *crypto, const acip_packet_plan_t *plan, buffer_domain_t *domain, void *ciphertext, size_t capacity, packet_header_t *header, size_t *length)
The useful part of acip packet plan is in buffers, count, plaintext_size, ciphertext_capacity: togeth...
Definition prepare.c:64
asciichat_error_t acip_packet_decrypt_payload(crypto_record_t *, unsigned channel, unsigned delivery, const void *, size_t, uint8_t **, size_t *, uint64_t *)
Definition prepare.c:188
struct crypto_record crypto_record_t
When code needs to work with crypto record, it keeps crypto, key_epoch, last_receive_epoch,...
size_t ciphertext_capacity
Definition prepare.h:20
crypto_record_t * records
Definition prepare.h:22
acip_send_options_t options
Definition prepare.h:24
const socket_buffer_t * buffers
Definition prepare.h:17
buffer_domain_t * domain
Borrowed control reserve for handshake/error traffic; NULL otherwise.
Definition prepare.h:25
size_t plaintext_size
Definition prepare.h:19
Endpoint cryptographic state for handshake, packet protection, authentication, and rekeying.
Fixed prefix shared by every ACIP packet on the wire.
Definition packet.h:628
acip_traffic_class_t
Definition traffic.h:5
acip_delivery_t
Definition traffic.h:11