wickr-crypto-c
|
Data Structures | |
struct | wickr_transport_handshake_meta |
Metadata specifically for handshake packets within a transport. More... | |
struct | wickr_transport_data_meta |
Metadata specifically for user data packets within a transport. More... | |
struct | wickr_transport_packet_meta |
Packet metadata included with all transport packets. More... | |
Functions | |
void | wickr_transport_packet_meta_initialize_handshake (wickr_transport_packet_meta_t *meta_out, uint8_t protocol_version, wickr_transport_packet_mac_type mac_type) |
void | wickr_transport_packet_meta_initialize_data (wickr_transport_packet_meta_t *meta_out, uint64_t sequence_number, wickr_transport_packet_mac_type mac_type) |
int | wickr_transport_packet_meta_initialize_buffer (wickr_transport_packet_meta_t *meta_out, const wickr_buffer_t *buffer) |
wickr_buffer_t * | wickr_transport_packet_meta_serialize (const wickr_transport_packet_meta_t *meta) |
int wickr_transport_packet_meta_initialize_buffer | ( | wickr_transport_packet_meta_t * | meta_out, |
const wickr_buffer_t * | buffer | ||
) |
Initialize packet metadata with a serialized packet meta buffer
meta_out | a pointer to initialize for the handshake metadata |
buffer | a buffer containing a serialized packet |
meta_out
or a negative int to indicate failure void wickr_transport_packet_meta_initialize_data | ( | wickr_transport_packet_meta_t * | meta_out, |
uint64_t | sequence_number, | ||
wickr_transport_packet_mac_type | mac_type | ||
) |
Initialize packet metadata for a data packet
meta_out | a pointer to initialize for the handshake metadata |
sequence_number | the sequence number of this packet within the current stream of data |
mac_type | the type of mac or signature to be used to authenticate the body data of the packet |
void wickr_transport_packet_meta_initialize_handshake | ( | wickr_transport_packet_meta_t * | meta_out, |
uint8_t | protocol_version, | ||
wickr_transport_packet_mac_type | mac_type | ||
) |
Initialize packet metadata for a handshake packet
meta_out | a pointer to initialize for the handshake metadata |
protocol_version | the protocol version the handshake will be using (default 1) |
mac_type | the type of mac or signature to be used to authenticate the body data of the packet |
wickr_buffer_t* wickr_transport_packet_meta_serialize | ( | const wickr_transport_packet_meta_t * | meta | ) |
meta | the metadata to serialize |
meta
or NULL if there was a failure during serialization