|
GRPC Core
9.0.0
|
#include <grpc/support/port_platform.h>#include "src/core/tsi/alts/frame_protector/alts_counter.h"#include <string.h>#include <grpc/support/alloc.h>Functions | |
| grpc_status_code | alts_counter_create (bool is_client, size_t counter_size, size_t overflow_size, alts_counter **crypter_counter, char **error_details) |
| This method creates and initializes an alts_counter instance. More... | |
| grpc_status_code | alts_counter_increment (alts_counter *crypter_counter, bool *is_overflow, char **error_details) |
| This method increments the internal counter. More... | |
| size_t | alts_counter_get_size (alts_counter *crypter_counter) |
| This method returns the size of counter buffer. More... | |
| unsigned char * | alts_counter_get_counter (alts_counter *crypter_counter) |
| This method returns the counter buffer. More... | |
| void | alts_counter_destroy (alts_counter *crypter_counter) |
| This method de-allocates all memory allocated to an alts_coutner instance. More... | |
| grpc_status_code alts_counter_create | ( | bool | is_client, |
| size_t | counter_size, | ||
| size_t | overflow_size, | ||
| alts_counter ** | crypter_counter, | ||
| char ** | error_details | ||
| ) |
This method creates and initializes an alts_counter 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).
| void alts_counter_destroy | ( | alts_counter * | crypter_counter | ) |
This method de-allocates all memory allocated to an alts_coutner instance.
| unsigned char* alts_counter_get_counter | ( | alts_counter * | crypter_counter | ) |
This method returns the counter buffer.
| size_t alts_counter_get_size | ( | alts_counter * | crypter_counter | ) |
This method returns the size of counter buffer.
| grpc_status_code alts_counter_increment | ( | alts_counter * | crypter_counter, |
| bool * | is_overflow, | ||
| char ** | error_details | ||
| ) |
This method increments the internal counter.
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).
If the lower overflow_size bytes are all zero, the counter has overflowed.