Files
nearby/third_party/ukey2/compiled_proto/proto/securemessage.pb.cc
T

3032 lines
120 KiB
C++

// Generated by the protocol buffer compiler. DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: proto/securemessage.proto
// Protobuf C++ Version: 6.33.3
#include "proto/securemessage.pb.h"
#include <algorithm>
#include <type_traits>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/generated_message_tctable_impl.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
// @@protoc_insertion_point(includes)
// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace securemessage {
inline constexpr SimpleRsaPublicKey::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
n_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
e_{65537} {}
template <typename>
PROTOBUF_CONSTEXPR SimpleRsaPublicKey::SimpleRsaPublicKey(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(SimpleRsaPublicKey_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct SimpleRsaPublicKeyDefaultTypeInternal {
PROTOBUF_CONSTEXPR SimpleRsaPublicKeyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~SimpleRsaPublicKeyDefaultTypeInternal() {}
union {
SimpleRsaPublicKey _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SimpleRsaPublicKeyDefaultTypeInternal _SimpleRsaPublicKey_default_instance_;
inline constexpr SecureMessage::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
header_and_body_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
signature_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()) {}
template <typename>
PROTOBUF_CONSTEXPR SecureMessage::SecureMessage(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(SecureMessage_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct SecureMessageDefaultTypeInternal {
PROTOBUF_CONSTEXPR SecureMessageDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~SecureMessageDefaultTypeInternal() {}
union {
SecureMessage _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SecureMessageDefaultTypeInternal _SecureMessage_default_instance_;
inline constexpr HeaderAndBodyInternal::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
header_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
body_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()) {}
template <typename>
PROTOBUF_CONSTEXPR HeaderAndBodyInternal::HeaderAndBodyInternal(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(HeaderAndBodyInternal_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct HeaderAndBodyInternalDefaultTypeInternal {
PROTOBUF_CONSTEXPR HeaderAndBodyInternalDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~HeaderAndBodyInternalDefaultTypeInternal() {}
union {
HeaderAndBodyInternal _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderAndBodyInternalDefaultTypeInternal _HeaderAndBodyInternal_default_instance_;
inline constexpr Header::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
verification_key_id_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
decryption_key_id_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
iv_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
public_metadata_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
associated_data_length_{0u},
signature_scheme_{static_cast< ::securemessage::SigScheme >(1)},
encryption_scheme_{static_cast< ::securemessage::EncScheme >(1)} {}
template <typename>
PROTOBUF_CONSTEXPR Header::Header(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(Header_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct HeaderDefaultTypeInternal {
PROTOBUF_CONSTEXPR HeaderDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~HeaderDefaultTypeInternal() {}
union {
Header _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderDefaultTypeInternal _Header_default_instance_;
inline constexpr EcP256PublicKey::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
x_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
y_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()) {}
template <typename>
PROTOBUF_CONSTEXPR EcP256PublicKey::EcP256PublicKey(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(EcP256PublicKey_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct EcP256PublicKeyDefaultTypeInternal {
PROTOBUF_CONSTEXPR EcP256PublicKeyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~EcP256PublicKeyDefaultTypeInternal() {}
union {
EcP256PublicKey _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EcP256PublicKeyDefaultTypeInternal _EcP256PublicKey_default_instance_;
inline constexpr DhPublicKey::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
y_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()) {}
template <typename>
PROTOBUF_CONSTEXPR DhPublicKey::DhPublicKey(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(DhPublicKey_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct DhPublicKeyDefaultTypeInternal {
PROTOBUF_CONSTEXPR DhPublicKeyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~DhPublicKeyDefaultTypeInternal() {}
union {
DhPublicKey _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DhPublicKeyDefaultTypeInternal _DhPublicKey_default_instance_;
inline constexpr HeaderAndBody::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
body_(
&::google::protobuf::internal::fixed_address_empty_string,
::_pbi::ConstantInitialized()),
header_{nullptr} {}
template <typename>
PROTOBUF_CONSTEXPR HeaderAndBody::HeaderAndBody(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(HeaderAndBody_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct HeaderAndBodyDefaultTypeInternal {
PROTOBUF_CONSTEXPR HeaderAndBodyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~HeaderAndBodyDefaultTypeInternal() {}
union {
HeaderAndBody _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HeaderAndBodyDefaultTypeInternal _HeaderAndBody_default_instance_;
inline constexpr GenericPublicKey::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: _cached_size_{0},
ec_p256_public_key_{nullptr},
rsa2048_public_key_{nullptr},
dh2048_public_key_{nullptr},
type_{static_cast< ::securemessage::PublicKeyType >(1)} {}
template <typename>
PROTOBUF_CONSTEXPR GenericPublicKey::GenericPublicKey(::_pbi::ConstantInitialized)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(GenericPublicKey_class_data_.base()),
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(),
#endif // PROTOBUF_CUSTOM_VTABLE
_impl_(::_pbi::ConstantInitialized()) {
}
struct GenericPublicKeyDefaultTypeInternal {
PROTOBUF_CONSTEXPR GenericPublicKeyDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~GenericPublicKeyDefaultTypeInternal() {}
union {
GenericPublicKey _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GenericPublicKeyDefaultTypeInternal _GenericPublicKey_default_instance_;
} // namespace securemessage
namespace securemessage {
PROTOBUF_CONSTINIT const uint32_t SigScheme_internal_data_[] = {
196609u, 0u, };
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
SigScheme_strings[3] = {};
static const char SigScheme_names[] = {
"ECDSA_P256_SHA256"
"HMAC_SHA256"
"RSA2048_SHA256"
};
static const ::google::protobuf::internal::EnumEntry SigScheme_entries[] = {
{{&SigScheme_names[0], 17}, 2},
{{&SigScheme_names[17], 11}, 1},
{{&SigScheme_names[28], 14}, 3},
};
static const int SigScheme_entries_by_number[] = {
1, // 1 -> HMAC_SHA256
0, // 2 -> ECDSA_P256_SHA256
2, // 3 -> RSA2048_SHA256
};
const ::std::string& SigScheme_Name(SigScheme value) {
static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
SigScheme_entries, SigScheme_entries_by_number, 3,
SigScheme_strings);
(void)kDummy;
int idx = ::google::protobuf::internal::LookUpEnumName(SigScheme_entries,
SigScheme_entries_by_number,
3, value);
return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : SigScheme_strings[idx].get();
}
bool SigScheme_Parse(::absl::string_view name, SigScheme* PROTOBUF_NONNULL value) {
int int_value;
bool success = ::google::protobuf::internal::LookUpEnumValue(
SigScheme_entries, 3, name, &int_value);
if (success) {
*value = static_cast<SigScheme>(int_value);
}
return success;
}
PROTOBUF_CONSTINIT const uint32_t EncScheme_internal_data_[] = {
131073u, 0u, };
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
EncScheme_strings[2] = {};
static const char EncScheme_names[] = {
"AES_256_CBC"
"NONE"
};
static const ::google::protobuf::internal::EnumEntry EncScheme_entries[] = {
{{&EncScheme_names[0], 11}, 2},
{{&EncScheme_names[11], 4}, 1},
};
static const int EncScheme_entries_by_number[] = {
1, // 1 -> NONE
0, // 2 -> AES_256_CBC
};
const ::std::string& EncScheme_Name(EncScheme value) {
static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
EncScheme_entries, EncScheme_entries_by_number, 2,
EncScheme_strings);
(void)kDummy;
int idx = ::google::protobuf::internal::LookUpEnumName(EncScheme_entries,
EncScheme_entries_by_number,
2, value);
return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : EncScheme_strings[idx].get();
}
bool EncScheme_Parse(::absl::string_view name, EncScheme* PROTOBUF_NONNULL value) {
int int_value;
bool success = ::google::protobuf::internal::LookUpEnumValue(
EncScheme_entries, 2, name, &int_value);
if (success) {
*value = static_cast<EncScheme>(int_value);
}
return success;
}
PROTOBUF_CONSTINIT const uint32_t PublicKeyType_internal_data_[] = {
196609u, 0u, };
static ::google::protobuf::internal::ExplicitlyConstructed<::std::string>
PublicKeyType_strings[3] = {};
static const char PublicKeyType_names[] = {
"DH2048_MODP"
"EC_P256"
"RSA2048"
};
static const ::google::protobuf::internal::EnumEntry PublicKeyType_entries[] = {
{{&PublicKeyType_names[0], 11}, 3},
{{&PublicKeyType_names[11], 7}, 1},
{{&PublicKeyType_names[18], 7}, 2},
};
static const int PublicKeyType_entries_by_number[] = {
1, // 1 -> EC_P256
2, // 2 -> RSA2048
0, // 3 -> DH2048_MODP
};
const ::std::string& PublicKeyType_Name(PublicKeyType value) {
static const bool kDummy = ::google::protobuf::internal::InitializeEnumStrings(
PublicKeyType_entries, PublicKeyType_entries_by_number, 3,
PublicKeyType_strings);
(void)kDummy;
int idx = ::google::protobuf::internal::LookUpEnumName(PublicKeyType_entries,
PublicKeyType_entries_by_number,
3, value);
return idx == -1 ? ::google::protobuf::internal::GetEmptyString() : PublicKeyType_strings[idx].get();
}
bool PublicKeyType_Parse(::absl::string_view name, PublicKeyType* PROTOBUF_NONNULL value) {
int int_value;
bool success = ::google::protobuf::internal::LookUpEnumValue(
PublicKeyType_entries, 3, name, &int_value);
if (success) {
*value = static_cast<PublicKeyType>(int_value);
}
return success;
}
// ===================================================================
class SecureMessage::_Internal {
public:
using HasBits =
decltype(::std::declval<SecureMessage>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(SecureMessage, _impl_._has_bits_);
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
}
};
SecureMessage::SecureMessage(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, SecureMessage_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:securemessage.SecureMessage)
}
PROTOBUF_NDEBUG_INLINE SecureMessage::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::securemessage::SecureMessage& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
header_and_body_(arena, from.header_and_body_),
signature_(arena, from.signature_) {}
SecureMessage::SecureMessage(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const SecureMessage& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, SecureMessage_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SecureMessage* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
// @@protoc_insertion_point(copy_constructor:securemessage.SecureMessage)
}
PROTOBUF_NDEBUG_INLINE SecureMessage::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
header_and_body_(arena),
signature_(arena) {}
inline void SecureMessage::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
SecureMessage::~SecureMessage() {
// @@protoc_insertion_point(destructor:securemessage.SecureMessage)
SharedDtor(*this);
}
inline void SecureMessage::SharedDtor(MessageLite& self) {
SecureMessage& this_ = static_cast<SecureMessage&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::std::string>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.header_and_body_.Destroy();
this_._impl_.signature_.Destroy();
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL SecureMessage::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) SecureMessage(arena);
}
constexpr auto SecureMessage::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SecureMessage),
alignof(SecureMessage));
}
constexpr auto SecureMessage::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataLite<28>{
{
&_SecureMessage_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
SecureMessage::IsInitializedImpl,
&SecureMessage::MergeImpl,
::google::protobuf::MessageLite::GetNewImpl<SecureMessage>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&SecureMessage::SharedDtor,
::google::protobuf::MessageLite::GetClearImpl<SecureMessage>(), &SecureMessage::ByteSizeLong,
&SecureMessage::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(SecureMessage, _impl_._cached_size_),
true,
},
"securemessage.SecureMessage",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<28> SecureMessage_class_data_ =
SecureMessage::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SecureMessage::GetClassData() const {
return SecureMessage_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
SecureMessage::_table_ = {
{
PROTOBUF_FIELD_OFFSET(SecureMessage, _impl_._has_bits_),
0, // no _extensions_
2, 8, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967292, // skipmap
offsetof(decltype(_table_), field_entries),
2, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
SecureMessage_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::securemessage::SecureMessage>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// required bytes signature = 2;
{::_pbi::TcParser::FastBS1,
{18, 1, 0,
PROTOBUF_FIELD_OFFSET(SecureMessage, _impl_.signature_)}},
// required bytes header_and_body = 1;
{::_pbi::TcParser::FastBS1,
{10, 0, 0,
PROTOBUF_FIELD_OFFSET(SecureMessage, _impl_.header_and_body_)}},
}}, {{
65535, 65535
}}, {{
// required bytes header_and_body = 1;
{PROTOBUF_FIELD_OFFSET(SecureMessage, _impl_.header_and_body_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
// required bytes signature = 2;
{PROTOBUF_FIELD_OFFSET(SecureMessage, _impl_.signature_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
}},
// no aux_entries
{{
}},
};
PROTOBUF_NOINLINE void SecureMessage::Clear() {
// @@protoc_insertion_point(message_clear_start:securemessage.SecureMessage)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_impl_.header_and_body_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_impl_.signature_.ClearNonDefaultToEmpty();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::std::string>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL SecureMessage::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const SecureMessage& this_ = static_cast<const SecureMessage&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL SecureMessage::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const SecureMessage& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:securemessage.SecureMessage)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// required bytes header_and_body = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
const ::std::string& _s = this_._internal_header_and_body();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
// required bytes signature = 2;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
const ::std::string& _s = this_._internal_signature();
target = stream->WriteBytesMaybeAliased(2, _s, target);
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:securemessage.SecureMessage)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t SecureMessage::ByteSizeLong(const MessageLite& base) {
const SecureMessage& this_ = static_cast<const SecureMessage&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t SecureMessage::ByteSizeLong() const {
const SecureMessage& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:securemessage.SecureMessage)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
::_pbi::Prefetch5LinesFrom7Lines(&this_);
cached_has_bits = this_._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
// required bytes header_and_body = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_header_and_body());
}
// required bytes signature = 2;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_signature());
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
}
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void SecureMessage::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<SecureMessage*>(&to_msg);
auto& from = static_cast<const SecureMessage&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.SecureMessage)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_this->_internal_set_header_and_body(from._internal_header_and_body());
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_this->_internal_set_signature(from._internal_signature());
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
}
void SecureMessage::CopyFrom(const SecureMessage& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.SecureMessage)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool SecureMessage::IsInitializedImpl(
const MessageLite& msg) {
auto& this_ = static_cast<const SecureMessage&>(msg);
if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
return false;
}
return true;
}
void SecureMessage::InternalSwap(SecureMessage* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.header_and_body_, &other->_impl_.header_and_body_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.signature_, &other->_impl_.signature_, arena);
}
// ===================================================================
class Header::_Internal {
public:
using HasBits =
decltype(::std::declval<Header>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(Header, _impl_._has_bits_);
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000060) ^ 0x00000060) != 0;
}
};
Header::Header(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, Header_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:securemessage.Header)
}
PROTOBUF_NDEBUG_INLINE Header::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::securemessage::Header& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
verification_key_id_(arena, from.verification_key_id_),
decryption_key_id_(arena, from.decryption_key_id_),
iv_(arena, from.iv_),
public_metadata_(arena, from.public_metadata_) {}
Header::Header(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const Header& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, Header_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
Header* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
::memcpy(reinterpret_cast<char*>(&_impl_) +
offsetof(Impl_, associated_data_length_),
reinterpret_cast<const char*>(&from._impl_) +
offsetof(Impl_, associated_data_length_),
offsetof(Impl_, encryption_scheme_) -
offsetof(Impl_, associated_data_length_) +
sizeof(Impl_::encryption_scheme_));
// @@protoc_insertion_point(copy_constructor:securemessage.Header)
}
PROTOBUF_NDEBUG_INLINE Header::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
verification_key_id_(arena),
decryption_key_id_(arena),
iv_(arena),
public_metadata_(arena),
signature_scheme_{static_cast< ::securemessage::SigScheme >(1)},
encryption_scheme_{static_cast< ::securemessage::EncScheme >(1)} {}
inline void Header::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.associated_data_length_ = {};
}
Header::~Header() {
// @@protoc_insertion_point(destructor:securemessage.Header)
SharedDtor(*this);
}
inline void Header::SharedDtor(MessageLite& self) {
Header& this_ = static_cast<Header&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::std::string>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.verification_key_id_.Destroy();
this_._impl_.decryption_key_id_.Destroy();
this_._impl_.iv_.Destroy();
this_._impl_.public_metadata_.Destroy();
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL Header::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) Header(arena);
}
constexpr auto Header::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(Header),
alignof(Header));
}
constexpr auto Header::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataLite<21>{
{
&_Header_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
Header::IsInitializedImpl,
&Header::MergeImpl,
::google::protobuf::MessageLite::GetNewImpl<Header>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&Header::SharedDtor,
::google::protobuf::MessageLite::GetClearImpl<Header>(), &Header::ByteSizeLong,
&Header::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(Header, _impl_._cached_size_),
true,
},
"securemessage.Header",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<21> Header_class_data_ =
Header::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
Header::GetClassData() const {
return Header_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<3, 7, 2, 0, 2>
Header::_table_ = {
{
PROTOBUF_FIELD_OFFSET(Header, _impl_._has_bits_),
0, // no _extensions_
7, 56, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967168, // skipmap
offsetof(decltype(_table_), field_entries),
7, // num_field_entries
2, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
Header_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::securemessage::Header>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
{::_pbi::TcParser::MiniParse, {}},
// required .securemessage.SigScheme signature_scheme = 1;
{::_pbi::TcParser::FastEr1S1,
{8, 5, 3,
PROTOBUF_FIELD_OFFSET(Header, _impl_.signature_scheme_)}},
// required .securemessage.EncScheme encryption_scheme = 2;
{::_pbi::TcParser::FastEr1S1,
{16, 6, 2,
PROTOBUF_FIELD_OFFSET(Header, _impl_.encryption_scheme_)}},
// optional bytes verification_key_id = 3;
{::_pbi::TcParser::FastBS1,
{26, 0, 0,
PROTOBUF_FIELD_OFFSET(Header, _impl_.verification_key_id_)}},
// optional bytes decryption_key_id = 4;
{::_pbi::TcParser::FastBS1,
{34, 1, 0,
PROTOBUF_FIELD_OFFSET(Header, _impl_.decryption_key_id_)}},
// optional bytes iv = 5;
{::_pbi::TcParser::FastBS1,
{42, 2, 0,
PROTOBUF_FIELD_OFFSET(Header, _impl_.iv_)}},
// optional bytes public_metadata = 6;
{::_pbi::TcParser::FastBS1,
{50, 3, 0,
PROTOBUF_FIELD_OFFSET(Header, _impl_.public_metadata_)}},
// optional uint32 associated_data_length = 7 [default = 0];
{::_pbi::TcParser::FastV32S1,
{56, 4, 0,
PROTOBUF_FIELD_OFFSET(Header, _impl_.associated_data_length_)}},
}}, {{
65535, 65535
}}, {{
// required .securemessage.SigScheme signature_scheme = 1;
{PROTOBUF_FIELD_OFFSET(Header, _impl_.signature_scheme_), _Internal::kHasBitsOffset + 5, 0, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
// required .securemessage.EncScheme encryption_scheme = 2;
{PROTOBUF_FIELD_OFFSET(Header, _impl_.encryption_scheme_), _Internal::kHasBitsOffset + 6, 1, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
// optional bytes verification_key_id = 3;
{PROTOBUF_FIELD_OFFSET(Header, _impl_.verification_key_id_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
// optional bytes decryption_key_id = 4;
{PROTOBUF_FIELD_OFFSET(Header, _impl_.decryption_key_id_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
// optional bytes iv = 5;
{PROTOBUF_FIELD_OFFSET(Header, _impl_.iv_), _Internal::kHasBitsOffset + 2, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
// optional bytes public_metadata = 6;
{PROTOBUF_FIELD_OFFSET(Header, _impl_.public_metadata_), _Internal::kHasBitsOffset + 3, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
// optional uint32 associated_data_length = 7 [default = 0];
{PROTOBUF_FIELD_OFFSET(Header, _impl_.associated_data_length_), _Internal::kHasBitsOffset + 4, 0, (0 | ::_fl::kFcOptional | ::_fl::kUInt32)},
}},
{{
{1, 3},
{1, 2},
}},
{{
}},
};
PROTOBUF_NOINLINE void Header::Clear() {
// @@protoc_insertion_point(message_clear_start:securemessage.Header)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_impl_.verification_key_id_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_impl_.decryption_key_id_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
_impl_.iv_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
_impl_.public_metadata_.ClearNonDefaultToEmpty();
}
}
if (BatchCheckHasBit(cached_has_bits, 0x00000070U)) {
_impl_.associated_data_length_ = 0u;
_impl_.signature_scheme_ = 1;
_impl_.encryption_scheme_ = 1;
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::std::string>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL Header::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const Header& this_ = static_cast<const Header&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL Header::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const Header& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:securemessage.Header)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// required .securemessage.SigScheme signature_scheme = 1;
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
1, this_._internal_signature_scheme(), target);
}
// required .securemessage.EncScheme encryption_scheme = 2;
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
2, this_._internal_encryption_scheme(), target);
}
// optional bytes verification_key_id = 3;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
const ::std::string& _s = this_._internal_verification_key_id();
target = stream->WriteBytesMaybeAliased(3, _s, target);
}
// optional bytes decryption_key_id = 4;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
const ::std::string& _s = this_._internal_decryption_key_id();
target = stream->WriteBytesMaybeAliased(4, _s, target);
}
// optional bytes iv = 5;
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
const ::std::string& _s = this_._internal_iv();
target = stream->WriteBytesMaybeAliased(5, _s, target);
}
// optional bytes public_metadata = 6;
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
const ::std::string& _s = this_._internal_public_metadata();
target = stream->WriteBytesMaybeAliased(6, _s, target);
}
// optional uint32 associated_data_length = 7 [default = 0];
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(
7, this_._internal_associated_data_length(), target);
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:securemessage.Header)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t Header::ByteSizeLong(const MessageLite& base) {
const Header& this_ = static_cast<const Header&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t Header::ByteSizeLong() const {
const Header& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:securemessage.Header)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
::_pbi::Prefetch5LinesFrom7Lines(&this_);
cached_has_bits = this_._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x0000001fU)) {
// optional bytes verification_key_id = 3;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_verification_key_id());
}
// optional bytes decryption_key_id = 4;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_decryption_key_id());
}
// optional bytes iv = 5;
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_iv());
}
// optional bytes public_metadata = 6;
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_public_metadata());
}
// optional uint32 associated_data_length = 7 [default = 0];
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(
this_._internal_associated_data_length());
}
}
if (BatchCheckHasBit(cached_has_bits, 0x00000060U)) {
// required .securemessage.SigScheme signature_scheme = 1;
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this_._internal_signature_scheme());
}
// required .securemessage.EncScheme encryption_scheme = 2;
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this_._internal_encryption_scheme());
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
}
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void Header::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<Header*>(&to_msg);
auto& from = static_cast<const Header&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.Header)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x0000007fU)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_this->_internal_set_verification_key_id(from._internal_verification_key_id());
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_this->_internal_set_decryption_key_id(from._internal_decryption_key_id());
}
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
_this->_internal_set_iv(from._internal_iv());
}
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
_this->_internal_set_public_metadata(from._internal_public_metadata());
}
if (CheckHasBit(cached_has_bits, 0x00000010U)) {
_this->_impl_.associated_data_length_ = from._impl_.associated_data_length_;
}
if (CheckHasBit(cached_has_bits, 0x00000020U)) {
_this->_impl_.signature_scheme_ = from._impl_.signature_scheme_;
}
if (CheckHasBit(cached_has_bits, 0x00000040U)) {
_this->_impl_.encryption_scheme_ = from._impl_.encryption_scheme_;
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
}
void Header::CopyFrom(const Header& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.Header)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool Header::IsInitializedImpl(
const MessageLite& msg) {
auto& this_ = static_cast<const Header&>(msg);
if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
return false;
}
return true;
}
void Header::InternalSwap(Header* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.verification_key_id_, &other->_impl_.verification_key_id_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.decryption_key_id_, &other->_impl_.decryption_key_id_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.iv_, &other->_impl_.iv_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.public_metadata_, &other->_impl_.public_metadata_, arena);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(Header, _impl_.encryption_scheme_)
+ sizeof(Header::_impl_.encryption_scheme_)
- PROTOBUF_FIELD_OFFSET(Header, _impl_.associated_data_length_)>(
reinterpret_cast<char*>(&_impl_.associated_data_length_),
reinterpret_cast<char*>(&other->_impl_.associated_data_length_));
}
// ===================================================================
class HeaderAndBody::_Internal {
public:
using HasBits =
decltype(::std::declval<HeaderAndBody>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(HeaderAndBody, _impl_._has_bits_);
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
}
};
HeaderAndBody::HeaderAndBody(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, HeaderAndBody_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:securemessage.HeaderAndBody)
}
PROTOBUF_NDEBUG_INLINE HeaderAndBody::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::securemessage::HeaderAndBody& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
body_(arena, from.body_) {}
HeaderAndBody::HeaderAndBody(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const HeaderAndBody& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, HeaderAndBody_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
HeaderAndBody* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
::uint32_t cached_has_bits = _impl_._has_bits_[0];
_impl_.header_ = (CheckHasBit(cached_has_bits, 0x00000002U))
? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.header_)
: nullptr;
// @@protoc_insertion_point(copy_constructor:securemessage.HeaderAndBody)
}
PROTOBUF_NDEBUG_INLINE HeaderAndBody::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
body_(arena) {}
inline void HeaderAndBody::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
_impl_.header_ = {};
}
HeaderAndBody::~HeaderAndBody() {
// @@protoc_insertion_point(destructor:securemessage.HeaderAndBody)
SharedDtor(*this);
}
inline void HeaderAndBody::SharedDtor(MessageLite& self) {
HeaderAndBody& this_ = static_cast<HeaderAndBody&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::std::string>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.body_.Destroy();
delete this_._impl_.header_;
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL HeaderAndBody::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) HeaderAndBody(arena);
}
constexpr auto HeaderAndBody::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(HeaderAndBody),
alignof(HeaderAndBody));
}
constexpr auto HeaderAndBody::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataLite<28>{
{
&_HeaderAndBody_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
HeaderAndBody::IsInitializedImpl,
&HeaderAndBody::MergeImpl,
::google::protobuf::MessageLite::GetNewImpl<HeaderAndBody>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&HeaderAndBody::SharedDtor,
::google::protobuf::MessageLite::GetClearImpl<HeaderAndBody>(), &HeaderAndBody::ByteSizeLong,
&HeaderAndBody::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(HeaderAndBody, _impl_._cached_size_),
true,
},
"securemessage.HeaderAndBody",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<28> HeaderAndBody_class_data_ =
HeaderAndBody::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HeaderAndBody::GetClassData() const {
return HeaderAndBody_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 1, 0, 2>
HeaderAndBody::_table_ = {
{
PROTOBUF_FIELD_OFFSET(HeaderAndBody, _impl_._has_bits_),
0, // no _extensions_
2, 8, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967292, // skipmap
offsetof(decltype(_table_), field_entries),
2, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
HeaderAndBody_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::securemessage::HeaderAndBody>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// required bytes body = 2;
{::_pbi::TcParser::FastBS1,
{18, 0, 0,
PROTOBUF_FIELD_OFFSET(HeaderAndBody, _impl_.body_)}},
// required .securemessage.Header header = 1;
{::_pbi::TcParser::FastMtS1,
{10, 1, 0,
PROTOBUF_FIELD_OFFSET(HeaderAndBody, _impl_.header_)}},
}}, {{
65535, 65535
}}, {{
// required .securemessage.Header header = 1;
{PROTOBUF_FIELD_OFFSET(HeaderAndBody, _impl_.header_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
// required bytes body = 2;
{PROTOBUF_FIELD_OFFSET(HeaderAndBody, _impl_.body_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
}},
{{
{::_pbi::TcParser::GetTable<::securemessage::Header>()},
}},
{{
}},
};
PROTOBUF_NOINLINE void HeaderAndBody::Clear() {
// @@protoc_insertion_point(message_clear_start:securemessage.HeaderAndBody)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_impl_.body_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
ABSL_DCHECK(_impl_.header_ != nullptr);
_impl_.header_->Clear();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::std::string>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL HeaderAndBody::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const HeaderAndBody& this_ = static_cast<const HeaderAndBody&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL HeaderAndBody::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const HeaderAndBody& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:securemessage.HeaderAndBody)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// required .securemessage.Header header = 1;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1, *this_._impl_.header_, this_._impl_.header_->GetCachedSize(), target,
stream);
}
// required bytes body = 2;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
const ::std::string& _s = this_._internal_body();
target = stream->WriteBytesMaybeAliased(2, _s, target);
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:securemessage.HeaderAndBody)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t HeaderAndBody::ByteSizeLong(const MessageLite& base) {
const HeaderAndBody& this_ = static_cast<const HeaderAndBody&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t HeaderAndBody::ByteSizeLong() const {
const HeaderAndBody& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:securemessage.HeaderAndBody)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
::_pbi::Prefetch5LinesFrom7Lines(&this_);
cached_has_bits = this_._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
// required bytes body = 2;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_body());
}
// required .securemessage.Header header = 1;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.header_);
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
}
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void HeaderAndBody::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<HeaderAndBody*>(&to_msg);
auto& from = static_cast<const HeaderAndBody&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
::google::protobuf::Arena* arena = _this->GetArena();
// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.HeaderAndBody)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_this->_internal_set_body(from._internal_body());
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
ABSL_DCHECK(from._impl_.header_ != nullptr);
if (_this->_impl_.header_ == nullptr) {
_this->_impl_.header_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.header_);
} else {
_this->_impl_.header_->MergeFrom(*from._impl_.header_);
}
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
}
void HeaderAndBody::CopyFrom(const HeaderAndBody& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.HeaderAndBody)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool HeaderAndBody::IsInitializedImpl(
const MessageLite& msg) {
auto& this_ = static_cast<const HeaderAndBody&>(msg);
if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
return false;
}
if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000002U)) {
if (!this_._impl_.header_->IsInitialized()) return false;
}
return true;
}
void HeaderAndBody::InternalSwap(HeaderAndBody* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.body_, &other->_impl_.body_, arena);
swap(_impl_.header_, other->_impl_.header_);
}
// ===================================================================
class HeaderAndBodyInternal::_Internal {
public:
using HasBits =
decltype(::std::declval<HeaderAndBodyInternal>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(HeaderAndBodyInternal, _impl_._has_bits_);
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
}
};
HeaderAndBodyInternal::HeaderAndBodyInternal(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, HeaderAndBodyInternal_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:securemessage.HeaderAndBodyInternal)
}
PROTOBUF_NDEBUG_INLINE HeaderAndBodyInternal::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::securemessage::HeaderAndBodyInternal& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
header_(arena, from.header_),
body_(arena, from.body_) {}
HeaderAndBodyInternal::HeaderAndBodyInternal(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const HeaderAndBodyInternal& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, HeaderAndBodyInternal_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
HeaderAndBodyInternal* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
// @@protoc_insertion_point(copy_constructor:securemessage.HeaderAndBodyInternal)
}
PROTOBUF_NDEBUG_INLINE HeaderAndBodyInternal::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
header_(arena),
body_(arena) {}
inline void HeaderAndBodyInternal::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
HeaderAndBodyInternal::~HeaderAndBodyInternal() {
// @@protoc_insertion_point(destructor:securemessage.HeaderAndBodyInternal)
SharedDtor(*this);
}
inline void HeaderAndBodyInternal::SharedDtor(MessageLite& self) {
HeaderAndBodyInternal& this_ = static_cast<HeaderAndBodyInternal&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::std::string>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.header_.Destroy();
this_._impl_.body_.Destroy();
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL HeaderAndBodyInternal::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) HeaderAndBodyInternal(arena);
}
constexpr auto HeaderAndBodyInternal::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(HeaderAndBodyInternal),
alignof(HeaderAndBodyInternal));
}
constexpr auto HeaderAndBodyInternal::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataLite<36>{
{
&_HeaderAndBodyInternal_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
HeaderAndBodyInternal::IsInitializedImpl,
&HeaderAndBodyInternal::MergeImpl,
::google::protobuf::MessageLite::GetNewImpl<HeaderAndBodyInternal>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&HeaderAndBodyInternal::SharedDtor,
::google::protobuf::MessageLite::GetClearImpl<HeaderAndBodyInternal>(), &HeaderAndBodyInternal::ByteSizeLong,
&HeaderAndBodyInternal::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(HeaderAndBodyInternal, _impl_._cached_size_),
true,
},
"securemessage.HeaderAndBodyInternal",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<36> HeaderAndBodyInternal_class_data_ =
HeaderAndBodyInternal::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
HeaderAndBodyInternal::GetClassData() const {
return HeaderAndBodyInternal_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
HeaderAndBodyInternal::_table_ = {
{
PROTOBUF_FIELD_OFFSET(HeaderAndBodyInternal, _impl_._has_bits_),
0, // no _extensions_
2, 8, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967292, // skipmap
offsetof(decltype(_table_), field_entries),
2, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
HeaderAndBodyInternal_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::securemessage::HeaderAndBodyInternal>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// required bytes body = 2;
{::_pbi::TcParser::FastBS1,
{18, 1, 0,
PROTOBUF_FIELD_OFFSET(HeaderAndBodyInternal, _impl_.body_)}},
// required bytes header = 1;
{::_pbi::TcParser::FastBS1,
{10, 0, 0,
PROTOBUF_FIELD_OFFSET(HeaderAndBodyInternal, _impl_.header_)}},
}}, {{
65535, 65535
}}, {{
// required bytes header = 1;
{PROTOBUF_FIELD_OFFSET(HeaderAndBodyInternal, _impl_.header_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
// required bytes body = 2;
{PROTOBUF_FIELD_OFFSET(HeaderAndBodyInternal, _impl_.body_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
}},
// no aux_entries
{{
}},
};
PROTOBUF_NOINLINE void HeaderAndBodyInternal::Clear() {
// @@protoc_insertion_point(message_clear_start:securemessage.HeaderAndBodyInternal)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_impl_.header_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_impl_.body_.ClearNonDefaultToEmpty();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::std::string>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL HeaderAndBodyInternal::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const HeaderAndBodyInternal& this_ = static_cast<const HeaderAndBodyInternal&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL HeaderAndBodyInternal::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const HeaderAndBodyInternal& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:securemessage.HeaderAndBodyInternal)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// required bytes header = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
const ::std::string& _s = this_._internal_header();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
// required bytes body = 2;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
const ::std::string& _s = this_._internal_body();
target = stream->WriteBytesMaybeAliased(2, _s, target);
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:securemessage.HeaderAndBodyInternal)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t HeaderAndBodyInternal::ByteSizeLong(const MessageLite& base) {
const HeaderAndBodyInternal& this_ = static_cast<const HeaderAndBodyInternal&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t HeaderAndBodyInternal::ByteSizeLong() const {
const HeaderAndBodyInternal& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:securemessage.HeaderAndBodyInternal)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
::_pbi::Prefetch5LinesFrom7Lines(&this_);
cached_has_bits = this_._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
// required bytes header = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_header());
}
// required bytes body = 2;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_body());
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
}
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void HeaderAndBodyInternal::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<HeaderAndBodyInternal*>(&to_msg);
auto& from = static_cast<const HeaderAndBodyInternal&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.HeaderAndBodyInternal)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_this->_internal_set_header(from._internal_header());
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_this->_internal_set_body(from._internal_body());
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
}
void HeaderAndBodyInternal::CopyFrom(const HeaderAndBodyInternal& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.HeaderAndBodyInternal)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool HeaderAndBodyInternal::IsInitializedImpl(
const MessageLite& msg) {
auto& this_ = static_cast<const HeaderAndBodyInternal&>(msg);
if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
return false;
}
return true;
}
void HeaderAndBodyInternal::InternalSwap(HeaderAndBodyInternal* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.header_, &other->_impl_.header_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.body_, &other->_impl_.body_, arena);
}
// ===================================================================
class EcP256PublicKey::_Internal {
public:
using HasBits =
decltype(::std::declval<EcP256PublicKey>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(EcP256PublicKey, _impl_._has_bits_);
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000003) ^ 0x00000003) != 0;
}
};
EcP256PublicKey::EcP256PublicKey(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, EcP256PublicKey_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:securemessage.EcP256PublicKey)
}
PROTOBUF_NDEBUG_INLINE EcP256PublicKey::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::securemessage::EcP256PublicKey& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
x_(arena, from.x_),
y_(arena, from.y_) {}
EcP256PublicKey::EcP256PublicKey(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const EcP256PublicKey& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, EcP256PublicKey_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
EcP256PublicKey* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
// @@protoc_insertion_point(copy_constructor:securemessage.EcP256PublicKey)
}
PROTOBUF_NDEBUG_INLINE EcP256PublicKey::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
x_(arena),
y_(arena) {}
inline void EcP256PublicKey::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
EcP256PublicKey::~EcP256PublicKey() {
// @@protoc_insertion_point(destructor:securemessage.EcP256PublicKey)
SharedDtor(*this);
}
inline void EcP256PublicKey::SharedDtor(MessageLite& self) {
EcP256PublicKey& this_ = static_cast<EcP256PublicKey&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::std::string>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.x_.Destroy();
this_._impl_.y_.Destroy();
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL EcP256PublicKey::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) EcP256PublicKey(arena);
}
constexpr auto EcP256PublicKey::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(EcP256PublicKey),
alignof(EcP256PublicKey));
}
constexpr auto EcP256PublicKey::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataLite<30>{
{
&_EcP256PublicKey_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
EcP256PublicKey::IsInitializedImpl,
&EcP256PublicKey::MergeImpl,
::google::protobuf::MessageLite::GetNewImpl<EcP256PublicKey>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&EcP256PublicKey::SharedDtor,
::google::protobuf::MessageLite::GetClearImpl<EcP256PublicKey>(), &EcP256PublicKey::ByteSizeLong,
&EcP256PublicKey::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(EcP256PublicKey, _impl_._cached_size_),
true,
},
"securemessage.EcP256PublicKey",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<30> EcP256PublicKey_class_data_ =
EcP256PublicKey::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
EcP256PublicKey::GetClassData() const {
return EcP256PublicKey_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
EcP256PublicKey::_table_ = {
{
PROTOBUF_FIELD_OFFSET(EcP256PublicKey, _impl_._has_bits_),
0, // no _extensions_
2, 8, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967292, // skipmap
offsetof(decltype(_table_), field_entries),
2, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
EcP256PublicKey_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::securemessage::EcP256PublicKey>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// required bytes y = 2;
{::_pbi::TcParser::FastBS1,
{18, 1, 0,
PROTOBUF_FIELD_OFFSET(EcP256PublicKey, _impl_.y_)}},
// required bytes x = 1;
{::_pbi::TcParser::FastBS1,
{10, 0, 0,
PROTOBUF_FIELD_OFFSET(EcP256PublicKey, _impl_.x_)}},
}}, {{
65535, 65535
}}, {{
// required bytes x = 1;
{PROTOBUF_FIELD_OFFSET(EcP256PublicKey, _impl_.x_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
// required bytes y = 2;
{PROTOBUF_FIELD_OFFSET(EcP256PublicKey, _impl_.y_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
}},
// no aux_entries
{{
}},
};
PROTOBUF_NOINLINE void EcP256PublicKey::Clear() {
// @@protoc_insertion_point(message_clear_start:securemessage.EcP256PublicKey)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_impl_.x_.ClearNonDefaultToEmpty();
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_impl_.y_.ClearNonDefaultToEmpty();
}
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::std::string>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL EcP256PublicKey::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const EcP256PublicKey& this_ = static_cast<const EcP256PublicKey&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL EcP256PublicKey::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const EcP256PublicKey& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:securemessage.EcP256PublicKey)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// required bytes x = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
const ::std::string& _s = this_._internal_x();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
// required bytes y = 2;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
const ::std::string& _s = this_._internal_y();
target = stream->WriteBytesMaybeAliased(2, _s, target);
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:securemessage.EcP256PublicKey)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t EcP256PublicKey::ByteSizeLong(const MessageLite& base) {
const EcP256PublicKey& this_ = static_cast<const EcP256PublicKey&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t EcP256PublicKey::ByteSizeLong() const {
const EcP256PublicKey& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:securemessage.EcP256PublicKey)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
::_pbi::Prefetch5LinesFrom7Lines(&this_);
cached_has_bits = this_._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
// required bytes x = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_x());
}
// required bytes y = 2;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_y());
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
}
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void EcP256PublicKey::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<EcP256PublicKey*>(&to_msg);
auto& from = static_cast<const EcP256PublicKey&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.EcP256PublicKey)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_this->_internal_set_x(from._internal_x());
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_this->_internal_set_y(from._internal_y());
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
}
void EcP256PublicKey::CopyFrom(const EcP256PublicKey& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.EcP256PublicKey)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool EcP256PublicKey::IsInitializedImpl(
const MessageLite& msg) {
auto& this_ = static_cast<const EcP256PublicKey&>(msg);
if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
return false;
}
return true;
}
void EcP256PublicKey::InternalSwap(EcP256PublicKey* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.x_, &other->_impl_.x_, arena);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.y_, &other->_impl_.y_, arena);
}
// ===================================================================
class SimpleRsaPublicKey::_Internal {
public:
using HasBits =
decltype(::std::declval<SimpleRsaPublicKey>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(SimpleRsaPublicKey, _impl_._has_bits_);
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0;
}
};
SimpleRsaPublicKey::SimpleRsaPublicKey(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, SimpleRsaPublicKey_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:securemessage.SimpleRsaPublicKey)
}
PROTOBUF_NDEBUG_INLINE SimpleRsaPublicKey::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::securemessage::SimpleRsaPublicKey& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
n_(arena, from.n_) {}
SimpleRsaPublicKey::SimpleRsaPublicKey(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const SimpleRsaPublicKey& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, SimpleRsaPublicKey_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SimpleRsaPublicKey* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
_impl_.e_ = from._impl_.e_;
// @@protoc_insertion_point(copy_constructor:securemessage.SimpleRsaPublicKey)
}
PROTOBUF_NDEBUG_INLINE SimpleRsaPublicKey::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
n_(arena),
e_{65537} {}
inline void SimpleRsaPublicKey::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
SimpleRsaPublicKey::~SimpleRsaPublicKey() {
// @@protoc_insertion_point(destructor:securemessage.SimpleRsaPublicKey)
SharedDtor(*this);
}
inline void SimpleRsaPublicKey::SharedDtor(MessageLite& self) {
SimpleRsaPublicKey& this_ = static_cast<SimpleRsaPublicKey&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::std::string>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.n_.Destroy();
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL SimpleRsaPublicKey::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) SimpleRsaPublicKey(arena);
}
constexpr auto SimpleRsaPublicKey::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(SimpleRsaPublicKey),
alignof(SimpleRsaPublicKey));
}
constexpr auto SimpleRsaPublicKey::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataLite<33>{
{
&_SimpleRsaPublicKey_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
SimpleRsaPublicKey::IsInitializedImpl,
&SimpleRsaPublicKey::MergeImpl,
::google::protobuf::MessageLite::GetNewImpl<SimpleRsaPublicKey>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&SimpleRsaPublicKey::SharedDtor,
::google::protobuf::MessageLite::GetClearImpl<SimpleRsaPublicKey>(), &SimpleRsaPublicKey::ByteSizeLong,
&SimpleRsaPublicKey::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(SimpleRsaPublicKey, _impl_._cached_size_),
true,
},
"securemessage.SimpleRsaPublicKey",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<33> SimpleRsaPublicKey_class_data_ =
SimpleRsaPublicKey::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
SimpleRsaPublicKey::GetClassData() const {
return SimpleRsaPublicKey_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<1, 2, 0, 0, 2>
SimpleRsaPublicKey::_table_ = {
{
PROTOBUF_FIELD_OFFSET(SimpleRsaPublicKey, _impl_._has_bits_),
0, // no _extensions_
2, 8, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967292, // skipmap
offsetof(decltype(_table_), field_entries),
2, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
SimpleRsaPublicKey_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::securemessage::SimpleRsaPublicKey>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// optional int32 e = 2 [default = 65537];
{::_pbi::TcParser::FastV32S1,
{16, 1, 0,
PROTOBUF_FIELD_OFFSET(SimpleRsaPublicKey, _impl_.e_)}},
// required bytes n = 1;
{::_pbi::TcParser::FastBS1,
{10, 0, 0,
PROTOBUF_FIELD_OFFSET(SimpleRsaPublicKey, _impl_.n_)}},
}}, {{
65535, 65535
}}, {{
// required bytes n = 1;
{PROTOBUF_FIELD_OFFSET(SimpleRsaPublicKey, _impl_.n_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
// optional int32 e = 2 [default = 65537];
{PROTOBUF_FIELD_OFFSET(SimpleRsaPublicKey, _impl_.e_), _Internal::kHasBitsOffset + 1, 0, (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
}},
// no aux_entries
{{
}},
};
PROTOBUF_NOINLINE void SimpleRsaPublicKey::Clear() {
// @@protoc_insertion_point(message_clear_start:securemessage.SimpleRsaPublicKey)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_impl_.n_.ClearNonDefaultToEmpty();
}
_impl_.e_ = 65537;
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::std::string>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL SimpleRsaPublicKey::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const SimpleRsaPublicKey& this_ = static_cast<const SimpleRsaPublicKey&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL SimpleRsaPublicKey::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const SimpleRsaPublicKey& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:securemessage.SimpleRsaPublicKey)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// required bytes n = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
const ::std::string& _s = this_._internal_n();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
// optional int32 e = 2 [default = 65537];
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
target =
::google::protobuf::internal::WireFormatLite::WriteInt32ToArrayWithField<2>(
stream, this_._internal_e(), target);
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:securemessage.SimpleRsaPublicKey)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t SimpleRsaPublicKey::ByteSizeLong(const MessageLite& base) {
const SimpleRsaPublicKey& this_ = static_cast<const SimpleRsaPublicKey&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t SimpleRsaPublicKey::ByteSizeLong() const {
const SimpleRsaPublicKey& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:securemessage.SimpleRsaPublicKey)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
::_pbi::Prefetch5LinesFrom7Lines(&this_);
{
// required bytes n = 1;
cached_has_bits = this_._impl_._has_bits_[0];
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_n());
}
}
{
// optional int32 e = 2 [default = 65537];
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
this_._internal_e());
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
}
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void SimpleRsaPublicKey::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<SimpleRsaPublicKey*>(&to_msg);
auto& from = static_cast<const SimpleRsaPublicKey&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.SimpleRsaPublicKey)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000003U)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_this->_internal_set_n(from._internal_n());
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
_this->_impl_.e_ = from._impl_.e_;
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
}
void SimpleRsaPublicKey::CopyFrom(const SimpleRsaPublicKey& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.SimpleRsaPublicKey)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool SimpleRsaPublicKey::IsInitializedImpl(
const MessageLite& msg) {
auto& this_ = static_cast<const SimpleRsaPublicKey&>(msg);
if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
return false;
}
return true;
}
void SimpleRsaPublicKey::InternalSwap(SimpleRsaPublicKey* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.n_, &other->_impl_.n_, arena);
swap(_impl_.e_, other->_impl_.e_);
}
// ===================================================================
class DhPublicKey::_Internal {
public:
using HasBits =
decltype(::std::declval<DhPublicKey>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(DhPublicKey, _impl_._has_bits_);
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0;
}
};
DhPublicKey::DhPublicKey(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, DhPublicKey_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:securemessage.DhPublicKey)
}
PROTOBUF_NDEBUG_INLINE DhPublicKey::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::securemessage::DhPublicKey& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0},
y_(arena, from.y_) {}
DhPublicKey::DhPublicKey(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const DhPublicKey& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, DhPublicKey_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
DhPublicKey* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
// @@protoc_insertion_point(copy_constructor:securemessage.DhPublicKey)
}
PROTOBUF_NDEBUG_INLINE DhPublicKey::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
y_(arena) {}
inline void DhPublicKey::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
DhPublicKey::~DhPublicKey() {
// @@protoc_insertion_point(destructor:securemessage.DhPublicKey)
SharedDtor(*this);
}
inline void DhPublicKey::SharedDtor(MessageLite& self) {
DhPublicKey& this_ = static_cast<DhPublicKey&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::std::string>();
ABSL_DCHECK(this_.GetArena() == nullptr);
this_._impl_.y_.Destroy();
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL DhPublicKey::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) DhPublicKey(arena);
}
constexpr auto DhPublicKey::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(DhPublicKey),
alignof(DhPublicKey));
}
constexpr auto DhPublicKey::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataLite<26>{
{
&_DhPublicKey_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
DhPublicKey::IsInitializedImpl,
&DhPublicKey::MergeImpl,
::google::protobuf::MessageLite::GetNewImpl<DhPublicKey>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&DhPublicKey::SharedDtor,
::google::protobuf::MessageLite::GetClearImpl<DhPublicKey>(), &DhPublicKey::ByteSizeLong,
&DhPublicKey::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(DhPublicKey, _impl_._cached_size_),
true,
},
"securemessage.DhPublicKey",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<26> DhPublicKey_class_data_ =
DhPublicKey::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
DhPublicKey::GetClassData() const {
return DhPublicKey_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 1, 0, 0, 2>
DhPublicKey::_table_ = {
{
PROTOBUF_FIELD_OFFSET(DhPublicKey, _impl_._has_bits_),
0, // no _extensions_
1, 0, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967294, // skipmap
offsetof(decltype(_table_), field_entries),
1, // num_field_entries
0, // num_aux_entries
offsetof(decltype(_table_), field_names), // no aux_entries
DhPublicKey_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::securemessage::DhPublicKey>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// required bytes y = 1;
{::_pbi::TcParser::FastBS1,
{10, 0, 0,
PROTOBUF_FIELD_OFFSET(DhPublicKey, _impl_.y_)}},
}}, {{
65535, 65535
}}, {{
// required bytes y = 1;
{PROTOBUF_FIELD_OFFSET(DhPublicKey, _impl_.y_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
}},
// no aux_entries
{{
}},
};
PROTOBUF_NOINLINE void DhPublicKey::Clear() {
// @@protoc_insertion_point(message_clear_start:securemessage.DhPublicKey)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_impl_.y_.ClearNonDefaultToEmpty();
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::std::string>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL DhPublicKey::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const DhPublicKey& this_ = static_cast<const DhPublicKey&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL DhPublicKey::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const DhPublicKey& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:securemessage.DhPublicKey)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// required bytes y = 1;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
const ::std::string& _s = this_._internal_y();
target = stream->WriteBytesMaybeAliased(1, _s, target);
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:securemessage.DhPublicKey)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t DhPublicKey::ByteSizeLong(const MessageLite& base) {
const DhPublicKey& this_ = static_cast<const DhPublicKey&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t DhPublicKey::ByteSizeLong() const {
const DhPublicKey& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:securemessage.DhPublicKey)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
{
// required bytes y = 1;
cached_has_bits = this_._impl_._has_bits_[0];
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize(
this_._internal_y());
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
}
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void DhPublicKey::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<DhPublicKey*>(&to_msg);
auto& from = static_cast<const DhPublicKey&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.DhPublicKey)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
_this->_internal_set_y(from._internal_y());
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
}
void DhPublicKey::CopyFrom(const DhPublicKey& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.DhPublicKey)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool DhPublicKey::IsInitializedImpl(
const MessageLite& msg) {
auto& this_ = static_cast<const DhPublicKey&>(msg);
if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
return false;
}
return true;
}
void DhPublicKey::InternalSwap(DhPublicKey* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
auto* arena = GetArena();
ABSL_DCHECK_EQ(arena, other->GetArena());
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::_pbi::ArenaStringPtr::InternalSwap(&_impl_.y_, &other->_impl_.y_, arena);
}
// ===================================================================
class GenericPublicKey::_Internal {
public:
using HasBits =
decltype(::std::declval<GenericPublicKey>()._impl_._has_bits_);
static constexpr ::int32_t kHasBitsOffset =
8 * PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_._has_bits_);
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000008) ^ 0x00000008) != 0;
}
};
GenericPublicKey::GenericPublicKey(::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, GenericPublicKey_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:securemessage.GenericPublicKey)
}
PROTOBUF_NDEBUG_INLINE GenericPublicKey::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
[[maybe_unused]] const ::securemessage::GenericPublicKey& from_msg)
: _has_bits_{from._has_bits_},
_cached_size_{0} {}
GenericPublicKey::GenericPublicKey(
::google::protobuf::Arena* PROTOBUF_NULLABLE arena,
const GenericPublicKey& from)
#if defined(PROTOBUF_CUSTOM_VTABLE)
: ::google::protobuf::MessageLite(arena, GenericPublicKey_class_data_.base()) {
#else // PROTOBUF_CUSTOM_VTABLE
: ::google::protobuf::MessageLite(arena) {
#endif // PROTOBUF_CUSTOM_VTABLE
GenericPublicKey* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
::uint32_t cached_has_bits = _impl_._has_bits_[0];
_impl_.ec_p256_public_key_ = (CheckHasBit(cached_has_bits, 0x00000001U))
? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.ec_p256_public_key_)
: nullptr;
_impl_.rsa2048_public_key_ = (CheckHasBit(cached_has_bits, 0x00000002U))
? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.rsa2048_public_key_)
: nullptr;
_impl_.dh2048_public_key_ = (CheckHasBit(cached_has_bits, 0x00000004U))
? ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.dh2048_public_key_)
: nullptr;
_impl_.type_ = from._impl_.type_;
// @@protoc_insertion_point(copy_constructor:securemessage.GenericPublicKey)
}
PROTOBUF_NDEBUG_INLINE GenericPublicKey::Impl_::Impl_(
[[maybe_unused]] ::google::protobuf::internal::InternalVisibility visibility,
[[maybe_unused]] ::google::protobuf::Arena* PROTOBUF_NULLABLE arena)
: _cached_size_{0},
type_{static_cast< ::securemessage::PublicKeyType >(1)} {}
inline void GenericPublicKey::SharedCtor(::_pb::Arena* PROTOBUF_NULLABLE arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
::memset(reinterpret_cast<char*>(&_impl_) +
offsetof(Impl_, ec_p256_public_key_),
0,
offsetof(Impl_, dh2048_public_key_) -
offsetof(Impl_, ec_p256_public_key_) +
sizeof(Impl_::dh2048_public_key_));
}
GenericPublicKey::~GenericPublicKey() {
// @@protoc_insertion_point(destructor:securemessage.GenericPublicKey)
SharedDtor(*this);
}
inline void GenericPublicKey::SharedDtor(MessageLite& self) {
GenericPublicKey& this_ = static_cast<GenericPublicKey&>(self);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
this_._internal_metadata_.Delete<::std::string>();
ABSL_DCHECK(this_.GetArena() == nullptr);
delete this_._impl_.ec_p256_public_key_;
delete this_._impl_.rsa2048_public_key_;
delete this_._impl_.dh2048_public_key_;
this_._impl_.~Impl_();
}
inline void* PROTOBUF_NONNULL GenericPublicKey::PlacementNew_(
const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
::google::protobuf::Arena* PROTOBUF_NULLABLE arena) {
return ::new (mem) GenericPublicKey(arena);
}
constexpr auto GenericPublicKey::InternalNewImpl_() {
return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(GenericPublicKey),
alignof(GenericPublicKey));
}
constexpr auto GenericPublicKey::InternalGenerateClassData_() {
return ::google::protobuf::internal::ClassDataLite<31>{
{
&_GenericPublicKey_default_instance_._instance,
&_table_.header,
nullptr, // OnDemandRegisterArenaDtor
GenericPublicKey::IsInitializedImpl,
&GenericPublicKey::MergeImpl,
::google::protobuf::MessageLite::GetNewImpl<GenericPublicKey>(),
#if defined(PROTOBUF_CUSTOM_VTABLE)
&GenericPublicKey::SharedDtor,
::google::protobuf::MessageLite::GetClearImpl<GenericPublicKey>(), &GenericPublicKey::ByteSizeLong,
&GenericPublicKey::_InternalSerialize,
#endif // PROTOBUF_CUSTOM_VTABLE
PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_._cached_size_),
true,
},
"securemessage.GenericPublicKey",
};
}
PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::google::protobuf::internal::ClassDataLite<31> GenericPublicKey_class_data_ =
GenericPublicKey::InternalGenerateClassData_();
PROTOBUF_ATTRIBUTE_WEAK const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL
GenericPublicKey::GetClassData() const {
return GenericPublicKey_class_data_.base();
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<2, 4, 4, 0, 2>
GenericPublicKey::_table_ = {
{
PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_._has_bits_),
0, // no _extensions_
4, 24, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967280, // skipmap
offsetof(decltype(_table_), field_entries),
4, // num_field_entries
4, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
GenericPublicKey_class_data_.base(),
nullptr, // post_loop_handler
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::securemessage::GenericPublicKey>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// optional .securemessage.DhPublicKey dh2048_public_key = 4;
{::_pbi::TcParser::FastMtS1,
{34, 2, 2,
PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.dh2048_public_key_)}},
// required .securemessage.PublicKeyType type = 1;
{::_pbi::TcParser::FastEr1S1,
{8, 3, 3,
PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.type_)}},
// optional .securemessage.EcP256PublicKey ec_p256_public_key = 2;
{::_pbi::TcParser::FastMtS1,
{18, 0, 0,
PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.ec_p256_public_key_)}},
// optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3;
{::_pbi::TcParser::FastMtS1,
{26, 1, 1,
PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.rsa2048_public_key_)}},
}}, {{
65535, 65535
}}, {{
// required .securemessage.PublicKeyType type = 1;
{PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.type_), _Internal::kHasBitsOffset + 3, 3, (0 | ::_fl::kFcOptional | ::_fl::kEnumRange)},
// optional .securemessage.EcP256PublicKey ec_p256_public_key = 2;
{PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.ec_p256_public_key_), _Internal::kHasBitsOffset + 0, 0, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
// optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3;
{PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.rsa2048_public_key_), _Internal::kHasBitsOffset + 1, 1, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
// optional .securemessage.DhPublicKey dh2048_public_key = 4;
{PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.dh2048_public_key_), _Internal::kHasBitsOffset + 2, 2, (0 | ::_fl::kFcOptional | ::_fl::kMessage | ::_fl::kTvTable)},
}},
{{
{::_pbi::TcParser::GetTable<::securemessage::EcP256PublicKey>()},
{::_pbi::TcParser::GetTable<::securemessage::SimpleRsaPublicKey>()},
{::_pbi::TcParser::GetTable<::securemessage::DhPublicKey>()},
{1, 3},
}},
{{
}},
};
PROTOBUF_NOINLINE void GenericPublicKey::Clear() {
// @@protoc_insertion_point(message_clear_start:securemessage.GenericPublicKey)
::google::protobuf::internal::TSanWrite(&_impl_);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
ABSL_DCHECK(_impl_.ec_p256_public_key_ != nullptr);
_impl_.ec_p256_public_key_->Clear();
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
ABSL_DCHECK(_impl_.rsa2048_public_key_ != nullptr);
_impl_.rsa2048_public_key_->Clear();
}
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
ABSL_DCHECK(_impl_.dh2048_public_key_ != nullptr);
_impl_.dh2048_public_key_->Clear();
}
_impl_.type_ = 1;
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<::std::string>();
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::uint8_t* PROTOBUF_NONNULL GenericPublicKey::_InternalSerialize(
const ::google::protobuf::MessageLite& base, ::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) {
const GenericPublicKey& this_ = static_cast<const GenericPublicKey&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::uint8_t* PROTOBUF_NONNULL GenericPublicKey::_InternalSerialize(
::uint8_t* PROTOBUF_NONNULL target,
::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
const GenericPublicKey& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
this_.CheckHasBitConsistency();
}
// @@protoc_insertion_point(serialize_to_array_start:securemessage.GenericPublicKey)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = this_._impl_._has_bits_[0];
// required .securemessage.PublicKeyType type = 1;
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
1, this_._internal_type(), target);
}
// optional .securemessage.EcP256PublicKey ec_p256_public_key = 2;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
2, *this_._impl_.ec_p256_public_key_, this_._impl_.ec_p256_public_key_->GetCachedSize(), target,
stream);
}
// optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
3, *this_._impl_.rsa2048_public_key_, this_._impl_.rsa2048_public_key_->GetCachedSize(), target,
stream);
}
// optional .securemessage.DhPublicKey dh2048_public_key = 4;
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
4, *this_._impl_.dh2048_public_key_, this_._impl_.dh2048_public_key_->GetCachedSize(), target,
stream);
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:securemessage.GenericPublicKey)
return target;
}
#if defined(PROTOBUF_CUSTOM_VTABLE)
::size_t GenericPublicKey::ByteSizeLong(const MessageLite& base) {
const GenericPublicKey& this_ = static_cast<const GenericPublicKey&>(base);
#else // PROTOBUF_CUSTOM_VTABLE
::size_t GenericPublicKey::ByteSizeLong() const {
const GenericPublicKey& this_ = *this;
#endif // PROTOBUF_CUSTOM_VTABLE
// @@protoc_insertion_point(message_byte_size_start:securemessage.GenericPublicKey)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void)cached_has_bits;
::_pbi::Prefetch5LinesFrom7Lines(&this_);
cached_has_bits = this_._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x00000007U)) {
// optional .securemessage.EcP256PublicKey ec_p256_public_key = 2;
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.ec_p256_public_key_);
}
// optional .securemessage.SimpleRsaPublicKey rsa2048_public_key = 3;
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.rsa2048_public_key_);
}
// optional .securemessage.DhPublicKey dh2048_public_key = 4;
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
total_size += 1 +
::google::protobuf::internal::WireFormatLite::MessageSize(*this_._impl_.dh2048_public_key_);
}
}
{
// required .securemessage.PublicKeyType type = 1;
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this_._internal_type());
}
}
if (ABSL_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
total_size += this_._internal_metadata_.unknown_fields<::std::string>(::google::protobuf::internal::GetEmptyString).size();
}
this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void GenericPublicKey::MergeImpl(::google::protobuf::MessageLite& to_msg,
const ::google::protobuf::MessageLite& from_msg) {
auto* const _this =
static_cast<GenericPublicKey*>(&to_msg);
auto& from = static_cast<const GenericPublicKey&>(from_msg);
if constexpr (::_pbi::DebugHardenCheckHasBitConsistency()) {
from.CheckHasBitConsistency();
}
::google::protobuf::Arena* arena = _this->GetArena();
// @@protoc_insertion_point(class_specific_merge_from_start:securemessage.GenericPublicKey)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (BatchCheckHasBit(cached_has_bits, 0x0000000fU)) {
if (CheckHasBit(cached_has_bits, 0x00000001U)) {
ABSL_DCHECK(from._impl_.ec_p256_public_key_ != nullptr);
if (_this->_impl_.ec_p256_public_key_ == nullptr) {
_this->_impl_.ec_p256_public_key_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.ec_p256_public_key_);
} else {
_this->_impl_.ec_p256_public_key_->MergeFrom(*from._impl_.ec_p256_public_key_);
}
}
if (CheckHasBit(cached_has_bits, 0x00000002U)) {
ABSL_DCHECK(from._impl_.rsa2048_public_key_ != nullptr);
if (_this->_impl_.rsa2048_public_key_ == nullptr) {
_this->_impl_.rsa2048_public_key_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.rsa2048_public_key_);
} else {
_this->_impl_.rsa2048_public_key_->MergeFrom(*from._impl_.rsa2048_public_key_);
}
}
if (CheckHasBit(cached_has_bits, 0x00000004U)) {
ABSL_DCHECK(from._impl_.dh2048_public_key_ != nullptr);
if (_this->_impl_.dh2048_public_key_ == nullptr) {
_this->_impl_.dh2048_public_key_ = ::google::protobuf::MessageLite::CopyConstruct(arena, *from._impl_.dh2048_public_key_);
} else {
_this->_impl_.dh2048_public_key_->MergeFrom(*from._impl_.dh2048_public_key_);
}
}
if (CheckHasBit(cached_has_bits, 0x00000008U)) {
_this->_impl_.type_ = from._impl_.type_;
}
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
_this->_internal_metadata_.MergeFrom<::std::string>(
from._internal_metadata_);
}
void GenericPublicKey::CopyFrom(const GenericPublicKey& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:securemessage.GenericPublicKey)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool GenericPublicKey::IsInitializedImpl(
const MessageLite& msg) {
auto& this_ = static_cast<const GenericPublicKey&>(msg);
if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
return false;
}
if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000001U)) {
if (!this_._impl_.ec_p256_public_key_->IsInitialized()) return false;
}
if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000002U)) {
if (!this_._impl_.rsa2048_public_key_->IsInitialized()) return false;
}
if (CheckHasBit(this_._impl_._has_bits_[0], 0x00000004U)) {
if (!this_._impl_.dh2048_public_key_->IsInitialized()) return false;
}
return true;
}
void GenericPublicKey::InternalSwap(GenericPublicKey* PROTOBUF_RESTRICT PROTOBUF_NONNULL other) {
using ::std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::google::protobuf::internal::memswap<
PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.type_)
+ sizeof(GenericPublicKey::_impl_.type_)
- PROTOBUF_FIELD_OFFSET(GenericPublicKey, _impl_.ec_p256_public_key_)>(
reinterpret_cast<char*>(&_impl_.ec_p256_public_key_),
reinterpret_cast<char*>(&other->_impl_.ec_p256_public_key_));
}
// @@protoc_insertion_point(namespace_scope)
} // namespace securemessage
namespace google {
namespace protobuf {
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"