mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-18 12:28:41 +00:00
Update generated protobuf
This commit is contained in:
1 parent
44d8ac059b
commit
46c44e800c
11 files changed
+1040
-5134
No files matched your search
@@ -1,5 +1,6 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
// swiftlint:disable all
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: securemessage.proto
|
||||
@@ -37,123 +38,47 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
||||
}
|
||||
|
||||
/// Supported "signature" schemes (both symmetric key and public key based)
|
||||
enum Securemessage_SigScheme: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case hmacSha256 // = 1
|
||||
case ecdsaP256Sha256 // = 2
|
||||
enum Securemessage_SigScheme: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case hmacSha256 = 1
|
||||
case ecdsaP256Sha256 = 2
|
||||
|
||||
/// Not recommended -- use ECDSA_P256_SHA256 instead
|
||||
case rsa2048Sha256 // = 3
|
||||
case rsa2048Sha256 = 3
|
||||
|
||||
init() {
|
||||
self = .hmacSha256
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 1: self = .hmacSha256
|
||||
case 2: self = .ecdsaP256Sha256
|
||||
case 3: self = .rsa2048Sha256
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .hmacSha256: return 1
|
||||
case .ecdsaP256Sha256: return 2
|
||||
case .rsa2048Sha256: return 3
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securemessage_SigScheme: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
/// Supported encryption schemes
|
||||
enum Securemessage_EncScheme: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
enum Securemessage_EncScheme: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
|
||||
/// No encryption
|
||||
case none // = 1
|
||||
case aes256Cbc // = 2
|
||||
case none = 1
|
||||
case aes256Cbc = 2
|
||||
|
||||
init() {
|
||||
self = .none
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 1: self = .none
|
||||
case 2: self = .aes256Cbc
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .none: return 1
|
||||
case .aes256Cbc: return 2
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securemessage_EncScheme: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
/// A list of supported public key types
|
||||
enum Securemessage_PublicKeyType: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case ecP256 // = 1
|
||||
case rsa2048 // = 2
|
||||
enum Securemessage_PublicKeyType: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case ecP256 = 1
|
||||
case rsa2048 = 2
|
||||
|
||||
/// 2048-bit MODP group 14, from RFC 3526
|
||||
case dh2048Modp // = 3
|
||||
case dh2048Modp = 3
|
||||
|
||||
init() {
|
||||
self = .ecP256
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 1: self = .ecP256
|
||||
case 2: self = .rsa2048
|
||||
case 3: self = .dh2048Modp
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .ecP256: return 1
|
||||
case .rsa2048: return 2
|
||||
case .dh2048Modp: return 3
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securemessage_PublicKeyType: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
struct Securemessage_SecureMessage {
|
||||
struct Securemessage_SecureMessage: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -186,7 +111,7 @@ struct Securemessage_SecureMessage {
|
||||
fileprivate var _signature: Data? = nil
|
||||
}
|
||||
|
||||
struct Securemessage_Header {
|
||||
struct Securemessage_Header: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -273,7 +198,7 @@ struct Securemessage_Header {
|
||||
fileprivate var _associatedDataLength: UInt32? = nil
|
||||
}
|
||||
|
||||
struct Securemessage_HeaderAndBody {
|
||||
struct Securemessage_HeaderAndBody: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -311,7 +236,7 @@ struct Securemessage_HeaderAndBody {
|
||||
/// remains stable irrespective of protobuf implementation choices. This
|
||||
/// low-level representation of a HeaderAndBody should not be used by
|
||||
/// any code outside of the SecureMessage library implementation/tests.
|
||||
struct Securemessage_HeaderAndBodyInternal {
|
||||
struct Securemessage_HeaderAndBodyInternal: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -345,7 +270,7 @@ struct Securemessage_HeaderAndBodyInternal {
|
||||
}
|
||||
|
||||
/// A convenience proto for encoding NIST P-256 elliptic curve public keys
|
||||
struct Securemessage_EcP256PublicKey {
|
||||
struct Securemessage_EcP256PublicKey: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -379,7 +304,7 @@ struct Securemessage_EcP256PublicKey {
|
||||
}
|
||||
|
||||
/// A convenience proto for encoding RSA public keys with small exponents
|
||||
struct Securemessage_SimpleRsaPublicKey {
|
||||
struct Securemessage_SimpleRsaPublicKey: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -414,7 +339,7 @@ struct Securemessage_SimpleRsaPublicKey {
|
||||
/// A convenience proto for encoding Diffie-Hellman public keys,
|
||||
/// for use only when Elliptic Curve based key exchanges are not possible.
|
||||
/// (Note that the group parameters must be specified separately)
|
||||
struct Securemessage_DhPublicKey {
|
||||
struct Securemessage_DhPublicKey: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -436,7 +361,7 @@ struct Securemessage_DhPublicKey {
|
||||
fileprivate var _y: Data? = nil
|
||||
}
|
||||
|
||||
struct Securemessage_GenericPublicKey {
|
||||
struct Securemessage_GenericPublicKey: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -488,53 +413,25 @@ struct Securemessage_GenericPublicKey {
|
||||
fileprivate var _dh2048PublicKey: Securemessage_DhPublicKey? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension Securemessage_SigScheme: @unchecked Sendable {}
|
||||
extension Securemessage_EncScheme: @unchecked Sendable {}
|
||||
extension Securemessage_PublicKeyType: @unchecked Sendable {}
|
||||
extension Securemessage_SecureMessage: @unchecked Sendable {}
|
||||
extension Securemessage_Header: @unchecked Sendable {}
|
||||
extension Securemessage_HeaderAndBody: @unchecked Sendable {}
|
||||
extension Securemessage_HeaderAndBodyInternal: @unchecked Sendable {}
|
||||
extension Securemessage_EcP256PublicKey: @unchecked Sendable {}
|
||||
extension Securemessage_SimpleRsaPublicKey: @unchecked Sendable {}
|
||||
extension Securemessage_DhPublicKey: @unchecked Sendable {}
|
||||
extension Securemessage_GenericPublicKey: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "securemessage"
|
||||
|
||||
extension Securemessage_SigScheme: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "HMAC_SHA256"),
|
||||
2: .same(proto: "ECDSA_P256_SHA256"),
|
||||
3: .same(proto: "RSA2048_SHA256"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}HMAC_SHA256\0\u{1}ECDSA_P256_SHA256\0\u{1}RSA2048_SHA256\0")
|
||||
}
|
||||
|
||||
extension Securemessage_EncScheme: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "NONE"),
|
||||
2: .same(proto: "AES_256_CBC"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}NONE\0\u{1}AES_256_CBC\0")
|
||||
}
|
||||
|
||||
extension Securemessage_PublicKeyType: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "EC_P256"),
|
||||
2: .same(proto: "RSA2048"),
|
||||
3: .same(proto: "DH2048_MODP"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}EC_P256\0\u{1}RSA2048\0\u{1}DH2048_MODP\0")
|
||||
}
|
||||
|
||||
extension Securemessage_SecureMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SecureMessage"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "header_and_body"),
|
||||
2: .same(proto: "signature"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}header_and_body\0\u{1}signature\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._headerAndBody == nil {return false}
|
||||
@@ -579,15 +476,7 @@ extension Securemessage_SecureMessage: SwiftProtobuf.Message, SwiftProtobuf._Mes
|
||||
|
||||
extension Securemessage_Header: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Header"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "signature_scheme"),
|
||||
2: .standard(proto: "encryption_scheme"),
|
||||
3: .standard(proto: "verification_key_id"),
|
||||
4: .standard(proto: "decryption_key_id"),
|
||||
5: .same(proto: "iv"),
|
||||
6: .standard(proto: "public_metadata"),
|
||||
7: .standard(proto: "associated_data_length"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}signature_scheme\0\u{3}encryption_scheme\0\u{3}verification_key_id\0\u{3}decryption_key_id\0\u{1}iv\0\u{3}public_metadata\0\u{3}associated_data_length\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._signatureScheme == nil {return false}
|
||||
@@ -657,10 +546,7 @@ extension Securemessage_Header: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
|
||||
|
||||
extension Securemessage_HeaderAndBody: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".HeaderAndBody"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "header"),
|
||||
2: .same(proto: "body"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}header\0\u{1}body\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._header == nil {return false}
|
||||
@@ -706,10 +592,7 @@ extension Securemessage_HeaderAndBody: SwiftProtobuf.Message, SwiftProtobuf._Mes
|
||||
|
||||
extension Securemessage_HeaderAndBodyInternal: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".HeaderAndBodyInternal"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "header"),
|
||||
2: .same(proto: "body"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}header\0\u{1}body\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._header == nil {return false}
|
||||
@@ -754,10 +637,7 @@ extension Securemessage_HeaderAndBodyInternal: SwiftProtobuf.Message, SwiftProto
|
||||
|
||||
extension Securemessage_EcP256PublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".EcP256PublicKey"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "x"),
|
||||
2: .same(proto: "y"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}x\0\u{1}y\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._x == nil {return false}
|
||||
@@ -802,10 +682,7 @@ extension Securemessage_EcP256PublicKey: SwiftProtobuf.Message, SwiftProtobuf._M
|
||||
|
||||
extension Securemessage_SimpleRsaPublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SimpleRsaPublicKey"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "n"),
|
||||
2: .same(proto: "e"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}n\0\u{1}e\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._n == nil {return false}
|
||||
@@ -849,9 +726,7 @@ extension Securemessage_SimpleRsaPublicKey: SwiftProtobuf.Message, SwiftProtobuf
|
||||
|
||||
extension Securemessage_DhPublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".DhPublicKey"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "y"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}y\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._y == nil {return false}
|
||||
@@ -890,12 +765,7 @@ extension Securemessage_DhPublicKey: SwiftProtobuf.Message, SwiftProtobuf._Messa
|
||||
|
||||
extension Securemessage_GenericPublicKey: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".GenericPublicKey"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "type"),
|
||||
2: .standard(proto: "ec_p256_public_key"),
|
||||
3: .standard(proto: "rsa2048_public_key"),
|
||||
4: .standard(proto: "dh2048_public_key"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}ec_p256_public_key\0\u{3}rsa2048_public_key\0\u{3}dh2048_public_key\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._type == nil {return false}
|
||||
|
||||
Reference in new issue
Block a user