alts_counter.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2018 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_COUNTER_H
20 #define GRPC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_COUNTER_H
21 
23 
24 #include <stdbool.h>
25 #include <stdlib.h>
26 
27 #include <grpc/grpc.h>
28 
29 /* Main struct for a crypter counter managed within seal/unseal operations. */
30 typedef struct alts_counter {
31  size_t size;
32  size_t overflow_size;
33  unsigned char* counter;
34 } alts_counter;
35 
53 grpc_status_code alts_counter_create(bool is_client, size_t counter_size,
54  size_t overflow_size,
55  alts_counter** crypter_counter,
56  char** error_details);
57 
75  bool* is_overflow,
76  char** error_details);
77 
83 size_t alts_counter_get_size(alts_counter* crypter_counter);
84 
90 unsigned char* alts_counter_get_counter(alts_counter* crypter_counter);
91 
96 void alts_counter_destroy(alts_counter* crypter_counter);
97 
98 #endif /* GRPC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_COUNTER_H */
alts_counter
struct alts_counter alts_counter
alts_counter_get_size
size_t alts_counter_get_size(alts_counter *crypter_counter)
Definition: alts_counter.cc:99
alts_counter_destroy
void alts_counter_destroy(alts_counter *crypter_counter)
Definition: alts_counter.cc:113
alts_counter_increment
grpc_status_code alts_counter_increment(alts_counter *crypter_counter, bool *is_overflow, char **error_details)
Definition: alts_counter.cc:66
alts_counter::size
size_t size
Definition: alts_counter.h:31
grpc_status_code
grpc_status_code
Definition: include/grpc/impl/codegen/status.h:28
alts_counter_create
grpc_status_code alts_counter_create(bool is_client, size_t counter_size, size_t overflow_size, alts_counter **crypter_counter, char **error_details)
Definition: alts_counter.cc:34
alts_counter::counter
unsigned char * counter
Definition: alts_counter.h:33
grpc.h
alts_counter::overflow_size
size_t overflow_size
Definition: alts_counter.h:32
alts_counter_get_counter
unsigned char * alts_counter_get_counter(alts_counter *crypter_counter)
Definition: alts_counter.cc:106
alts_counter
Definition: alts_counter.h:30
port_platform.h


grpc
Author(s):
autogenerated on Thu Mar 13 2025 02:58:30