// // Created by miti on 27/07/19. // #include "UntrustedInclude/PostLAProtobufNativeTransforms.h" #include void PostLAProtobufNativeTransforms::get_lengths_for_protobuf_serialized_array(extension_to_decryptor_enclosed_msg &protobuf_ext_to_decryptor, uint32_t *op_ciphertext_length, uint32_t *op_number_of_ciphertext_fields) { uint32_t number_of_ciphertext_fields, counter, total_length; // Didn't use bytesize() or bytesizelong() for getting the lengths of the public key or the ciphertext string // as that gives the *serialized* length of the message which should be an upper-bound. // Can switch to that if necessary for time performance reasons. total_length=protobuf_ext_to_decryptor.ciphertext_client_public_key().length(); number_of_ciphertext_fields=protobuf_ext_to_decryptor.ciphertext_fields_size(); for(counter=0; counterset_field(ptr, sizes_array[counter]); ptr+=sizes_array[counter]; } }