chromium/third_party/grpc/src/src/core/tsi/alts/frame_protector/frame_handler.cc

//
//
// Copyright 2018 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

#include <grpc/support/port_platform.h>

#include "src/core/tsi/alts/frame_protector/frame_handler.h"

#include <limits.h>
#include <stdint.h>
#include <string.h>

#include <algorithm>

#include <grpc/support/alloc.h>
#include <grpc/support/log.h>

#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/gprpp/memory.h"

// Use little endian to interpret a string of bytes as uint32_t.
static uint32_t load_32_le(const unsigned char* buffer) {}

// Store uint32_t as a string of little endian bytes.
static void store_32_le(uint32_t value, unsigned char* buffer) {}

// Frame writer implementation.
alts_frame_writer* alts_create_frame_writer() {}

bool alts_reset_frame_writer(alts_frame_writer* writer,
                             const unsigned char* buffer, size_t length) {}

bool alts_write_frame_bytes(alts_frame_writer* writer, unsigned char* output,
                            size_t* bytes_size) {}

bool alts_is_frame_writer_done(alts_frame_writer* writer) {}

size_t alts_get_num_writer_bytes_remaining(alts_frame_writer* writer) {}

void alts_destroy_frame_writer(alts_frame_writer* writer) {}

// Frame reader implementation.
alts_frame_reader* alts_create_frame_reader() {}

bool alts_is_frame_reader_done(alts_frame_reader* reader) {}

bool alts_has_read_frame_length(alts_frame_reader* reader) {}

size_t alts_get_reader_bytes_remaining(alts_frame_reader* reader) {}

void alts_reset_reader_output_buffer(alts_frame_reader* reader,
                                     unsigned char* buffer) {}

bool alts_reset_frame_reader(alts_frame_reader* reader, unsigned char* buffer) {}

bool alts_read_frame_bytes(alts_frame_reader* reader,
                           const unsigned char* bytes, size_t* bytes_size) {}

size_t alts_get_output_bytes_read(alts_frame_reader* reader) {}

unsigned char* alts_get_output_buffer(alts_frame_reader* reader) {}

void alts_destroy_frame_reader(alts_frame_reader* reader) {}