chromium/third_party/openscreen/src/cast/streaming/impl/frame_crypto.h

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CAST_STREAMING_IMPL_FRAME_CRYPTO_H_
#define CAST_STREAMING_IMPL_FRAME_CRYPTO_H_

#include <stddef.h>
#include <stdint.h>

#include <array>
#include <vector>

#include "cast/streaming/public/encoded_frame.h"
#include "openssl/aes.h"
#include "platform/base/macros.h"
#include "platform/base/span.h"

namespace openscreen::cast {

class FrameCollector;
class FrameCrypto;

// A subclass of EncodedFrame that represents an EncodedFrame with encrypted
// payload data, and owns the buffer storing the encrypted payload data. Use
// FrameCrypto (below) to explicitly convert between EncryptedFrames and
// EncodedFrames.
struct EncryptedFrame : public EncodedFrame {};

// Encrypts EncodedFrames before sending, or decrypts EncryptedFrames that have
// been received.
class FrameCrypto {};

}  // namespace openscreen::cast

#endif  // CAST_STREAMING_IMPL_FRAME_CRYPTO_H_