#include <grpc/support/port_platform.h>
#include "src/core/tsi/alts/frame_protector/alts_record_protocol_crypter_common.h"
#include <grpc/support/alloc.h>
Go to the source code of this file.
Functions | |
alts_record_protocol_crypter * | alts_crypter_create_common (gsec_aead_crypter *crypter, bool is_client, size_t overflow_size, char **error_details) |
void | alts_record_protocol_crypter_destruct (alts_crypter *c) |
size_t | alts_record_protocol_crypter_num_overhead_bytes (const alts_crypter *c) |
grpc_status_code | increment_counter (alts_record_protocol_crypter *rp_crypter, char **error_details) |
grpc_status_code | input_sanity_check (const alts_record_protocol_crypter *rp_crypter, const unsigned char *data, size_t *output_size, char **error_details) |
static void | maybe_copy_error_msg (const char *src, char **dst) |
alts_record_protocol_crypter* alts_crypter_create_common | ( | gsec_aead_crypter * | crypter, |
bool | is_client, | ||
size_t | overflow_size, | ||
char ** | error_details | ||
) |
This method creates an alts_crypter instance, and populates the fields that are common to both seal and unseal operations.
On success of creation, the method returns alts_record_protocol_crypter instance. Otherwise, it returns nullptr with its details specified in error_details (if error_details is not nullptr).
Definition at line 90 of file alts_record_protocol_crypter_common.cc.
void alts_record_protocol_crypter_destruct | ( | alts_crypter * | c | ) |
Definition at line 81 of file alts_record_protocol_crypter_common.cc.
size_t alts_record_protocol_crypter_num_overhead_bytes | ( | const alts_crypter * | c | ) |
For the following two methods, please refer to the corresponding API in alts_crypter.h for detailed specifications.
Definition at line 66 of file alts_record_protocol_crypter_common.cc.
grpc_status_code increment_counter | ( | alts_record_protocol_crypter * | rp_crypter, |
char ** | error_details | ||
) |
This method increments the counter within an alts_record_protocol_crypter instance.
On success, the method returns GRPC_STATUS_OK. Otherwise, it returns an error status code along with its details specified in error_details (if error_details is not nullptr).
Definition at line 48 of file alts_record_protocol_crypter_common.cc.
grpc_status_code input_sanity_check | ( | const alts_record_protocol_crypter * | rp_crypter, |
const unsigned char * | data, | ||
size_t * | output_size, | ||
char ** | error_details | ||
) |
This method performs input sanity checks on a subset of inputs to alts_crypter_process_in_place() for both seal and unseal operations.
On success, the method returns GRPC_STATUS_OK. Otherwise, it returns an error status code along with its details specified in error_details (if error_details is not nullptr).
Definition at line 32 of file alts_record_protocol_crypter_common.cc.
|
static |
Definition at line 25 of file alts_record_protocol_crypter_common.cc.