alts_crypter.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_CRYPTER_H
20 #define GRPC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_CRYPTER_H
21 
23 
24 #include <stdbool.h>
25 #include <string.h>
26 
27 #include <grpc/grpc.h>
28 
30 
36 typedef struct alts_crypter alts_crypter;
37 
123 /* V-table for alts_crypter operations */
124 typedef struct alts_crypter_vtable {
125  size_t (*num_overhead_bytes)(const alts_crypter* crypter);
127  unsigned char* data,
128  size_t data_allocated_size,
129  size_t data_size, size_t* output_size,
130  char** error_details);
131  void (*destruct)(alts_crypter* crypter);
133 
134 /* Main struct for alts_crypter interface */
135 struct alts_crypter {
137 };
138 
152 size_t alts_crypter_num_overhead_bytes(const alts_crypter* crypter);
153 
192  alts_crypter* crypter, unsigned char* data, size_t data_allocated_size,
193  size_t data_size, size_t* output_size, char** error_details);
194 
216  size_t overflow_size,
217  alts_crypter** crypter,
218  char** error_details);
219 
241  bool is_client,
242  size_t overflow_size,
243  alts_crypter** crypter,
244  char** error_details);
245 
253 void alts_crypter_destroy(alts_crypter* crypter);
254 
255 #endif /* GRPC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_CRYPTER_H */
string.h
grpc_status_code
grpc_status_code
Definition: include/grpc/impl/codegen/status.h:28
alts_crypter_vtable
Definition: alts_crypter.h:124
alts_crypter_destroy
void alts_crypter_destroy(alts_crypter *crypter)
Definition: alts_crypter.cc:59
gsec.h
grpc.h
data
char data[kBufferLength]
Definition: abseil-cpp/absl/strings/internal/str_format/float_conversion.cc:1006
alts_crypter
Definition: alts_crypter.h:135
alts_crypter_vtable
struct alts_crypter_vtable alts_crypter_vtable
alts_crypter_vtable::num_overhead_bytes
size_t(* num_overhead_bytes)(const alts_crypter *crypter)
Definition: alts_crypter.h:125
gc
void gc(uv_timer_t *handle)
Definition: libuv/docs/code/ref-timer/main.c:9
alts_seal_crypter_create
grpc_status_code alts_seal_crypter_create(gsec_aead_crypter *gc, bool is_client, size_t overflow_size, alts_crypter **crypter, char **error_details)
Definition: alts_seal_privacy_integrity_crypter.cc:88
alts_crypter::vtable
const alts_crypter_vtable * vtable
Definition: alts_crypter.h:136
alts_crypter_vtable::destruct
void(* destruct)(alts_crypter *crypter)
Definition: alts_crypter.h:131
alts_crypter_vtable::process_in_place
grpc_status_code(* process_in_place)(alts_crypter *crypter, unsigned char *data, size_t data_allocated_size, size_t data_size, size_t *output_size, char **error_details)
Definition: alts_crypter.h:126
alts_unseal_crypter_create
grpc_status_code alts_unseal_crypter_create(gsec_aead_crypter *gc, bool is_client, size_t overflow_size, alts_crypter **crypter, char **error_details)
Definition: alts_unseal_privacy_integrity_crypter.cc:85
gsec_aead_crypter
Definition: gsec.h:178
alts_crypter_process_in_place
grpc_status_code alts_crypter_process_in_place(alts_crypter *crypter, unsigned char *data, size_t data_allocated_size, size_t data_size, size_t *output_size, char **error_details)
Definition: alts_crypter.cc:34
alts_crypter_num_overhead_bytes
size_t alts_crypter_num_overhead_bytes(const alts_crypter *crypter)
Definition: alts_crypter.cc:50
port_platform.h


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