GRPC Core  18.0.0
alts_record_protocol_crypter_common.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_RECORD_PROTOCOL_CRYPTER_COMMON_H
20 #define GRPC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_RECORD_PROTOCOL_CRYPTER_COMMON_H
21 
23 
24 #include <grpc/grpc.h>
25 
28 
43 
62  const alts_record_protocol_crypter* rp_crypter, const unsigned char* data,
63  size_t* output_size, char** error_details);
64 
80  char** error_details);
81 
102  gsec_aead_crypter* crypter, bool is_client, size_t overflow_size,
103  char** error_details);
104 
110 
112 
113 #endif /* GRPC_CORE_TSI_ALTS_FRAME_PROTECTOR_ALTS_RECORD_PROTOCOL_CRYPTER_COMMON_H \
114  */
struct alts_record_protocol_crypter alts_record_protocol_crypter
This file contains common implementation that will be used in both seal and unseal operations.
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 a...
Definition: alts_record_protocol_crypter_common.cc:90
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...
Definition: alts_record_protocol_crypter_common.cc:32
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.
Definition: alts_record_protocol_crypter_common.cc:48
void alts_record_protocol_crypter_destruct(alts_crypter *c)
Definition: alts_record_protocol_crypter_common.cc:81
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....
Definition: alts_record_protocol_crypter_common.cc:66
grpc_status_code
Definition: status.h:26
Definition: alts_counter.h:30
Definition: alts_crypter.h:135
This file contains common implementation that will be used in both seal and unseal operations.
Definition: alts_record_protocol_crypter_common.h:38
alts_counter * ctr
Definition: alts_record_protocol_crypter_common.h:41
gsec_aead_crypter * crypter
Definition: alts_record_protocol_crypter_common.h:40
alts_crypter base
Definition: alts_record_protocol_crypter_common.h:39
Definition: gsec.h:179