Functions | Variables
alts_counter_test.cc File Reference
#include "src/core/tsi/alts/frame_protector/alts_counter.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "test/core/tsi/alts/crypt/gsec_test_util.h"
Include dependency graph for alts_counter_test.cc:

Go to the source code of this file.

Functions

static void alts_counter_test_input_sanity_check (size_t counter_size, size_t overflow_size)
 
static void alts_counter_test_overflow_full_range (bool is_client, size_t counter_size, size_t overflow_size)
 
static void alts_counter_test_overflow_single_increment (bool is_client, size_t counter_size, size_t overflow_size)
 
static bool do_bytes_represent_client (alts_counter *ctr, unsigned char *, size_t size)
 
int main (int, char **)
 

Variables

const size_t kGcmCounterSize = 12
 
const size_t kGcmOverflowSize = 5
 
const size_t kSmallCounterSize = 4
 
const size_t kSmallOverflowSize = 1
 

Function Documentation

◆ alts_counter_test_input_sanity_check()

static void alts_counter_test_input_sanity_check ( size_t  counter_size,
size_t  overflow_size 
)
static

Definition at line 36 of file alts_counter_test.cc.

◆ alts_counter_test_overflow_full_range()

static void alts_counter_test_overflow_full_range ( bool  is_client,
size_t  counter_size,
size_t  overflow_size 
)
static

The counter can return 2^{overflow_size * 8} counters. The high-order bit is fixed to the client/server. The last call will yield a useable counter, but overflow the counter object.

Definition at line 86 of file alts_counter_test.cc.

◆ alts_counter_test_overflow_single_increment()

static void alts_counter_test_overflow_single_increment ( bool  is_client,
size_t  counter_size,
size_t  overflow_size 
)
static

Definition at line 132 of file alts_counter_test.cc.

◆ do_bytes_represent_client()

static bool do_bytes_represent_client ( alts_counter ctr,
unsigned char *  ,
size_t  size 
)
static

Definition at line 31 of file alts_counter_test.cc.

◆ main()

int main ( int  ,
char **   
)

Definition at line 169 of file alts_counter_test.cc.

Variable Documentation

◆ kGcmCounterSize

const size_t kGcmCounterSize = 12

Definition at line 28 of file alts_counter_test.cc.

◆ kGcmOverflowSize

const size_t kGcmOverflowSize = 5

Definition at line 29 of file alts_counter_test.cc.

◆ kSmallCounterSize

const size_t kSmallCounterSize = 4

Definition at line 26 of file alts_counter_test.cc.

◆ kSmallOverflowSize

const size_t kSmallOverflowSize = 1

Definition at line 27 of file alts_counter_test.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:02