mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +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
File renamed without changes.
@@ -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: device_to_device_messages.proto
|
||||
@@ -35,39 +36,17 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
||||
}
|
||||
|
||||
/// Type of curve
|
||||
enum Securegcm_Curve: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case ed25519 // = 1
|
||||
enum Securegcm_Curve: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case ed25519 = 1
|
||||
|
||||
init() {
|
||||
self = .ed25519
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 1: self = .ed25519
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .ed25519: return 1
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_Curve: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
/// Used by protocols between devices
|
||||
struct Securegcm_DeviceToDeviceMessage {
|
||||
struct Securegcm_DeviceToDeviceMessage: 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.
|
||||
@@ -102,7 +81,7 @@ struct Securegcm_DeviceToDeviceMessage {
|
||||
|
||||
/// sent as the first message from initiator to responder
|
||||
/// in an unauthenticated Diffie-Hellman Key Exchange
|
||||
struct Securegcm_InitiatorHello {
|
||||
struct Securegcm_InitiatorHello: 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.
|
||||
@@ -137,7 +116,7 @@ struct Securegcm_InitiatorHello {
|
||||
|
||||
/// sent inside the header of the first message from the responder to the
|
||||
/// initiator in an unauthenticated Diffie-Hellman Key Exchange
|
||||
struct Securegcm_ResponderHello {
|
||||
struct Securegcm_ResponderHello: 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.
|
||||
@@ -171,7 +150,7 @@ struct Securegcm_ResponderHello {
|
||||
}
|
||||
|
||||
/// A convenience proto for encoding curve points in affine representation
|
||||
struct Securegcm_EcPoint {
|
||||
struct Securegcm_EcPoint: 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.
|
||||
@@ -214,7 +193,7 @@ struct Securegcm_EcPoint {
|
||||
fileprivate var _y: Data? = nil
|
||||
}
|
||||
|
||||
struct Securegcm_SpakeHandshakeMessage {
|
||||
struct Securegcm_SpakeHandshakeMessage: 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.
|
||||
@@ -270,31 +249,17 @@ struct Securegcm_SpakeHandshakeMessage {
|
||||
fileprivate var _payload: Data? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension Securegcm_Curve: @unchecked Sendable {}
|
||||
extension Securegcm_DeviceToDeviceMessage: @unchecked Sendable {}
|
||||
extension Securegcm_InitiatorHello: @unchecked Sendable {}
|
||||
extension Securegcm_ResponderHello: @unchecked Sendable {}
|
||||
extension Securegcm_EcPoint: @unchecked Sendable {}
|
||||
extension Securegcm_SpakeHandshakeMessage: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "securegcm"
|
||||
|
||||
extension Securegcm_Curve: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "ED_25519"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}ED_25519\0")
|
||||
}
|
||||
|
||||
extension Securegcm_DeviceToDeviceMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".DeviceToDeviceMessage"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "message"),
|
||||
2: .standard(proto: "sequence_number"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}message\0\u{3}sequence_number\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -333,10 +298,7 @@ extension Securegcm_DeviceToDeviceMessage: SwiftProtobuf.Message, SwiftProtobuf.
|
||||
|
||||
extension Securegcm_InitiatorHello: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".InitiatorHello"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "public_dh_key"),
|
||||
2: .standard(proto: "protocol_version"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_dh_key\0\u{3}protocol_version\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if let v = self._publicDhKey, !v.isInitialized {return false}
|
||||
@@ -380,10 +342,7 @@ extension Securegcm_InitiatorHello: SwiftProtobuf.Message, SwiftProtobuf._Messag
|
||||
|
||||
extension Securegcm_ResponderHello: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ResponderHello"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "public_dh_key"),
|
||||
2: .standard(proto: "protocol_version"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_dh_key\0\u{3}protocol_version\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if let v = self._publicDhKey, !v.isInitialized {return false}
|
||||
@@ -427,11 +386,7 @@ extension Securegcm_ResponderHello: SwiftProtobuf.Message, SwiftProtobuf._Messag
|
||||
|
||||
extension Securegcm_EcPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".EcPoint"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "curve"),
|
||||
2: .same(proto: "x"),
|
||||
3: .same(proto: "y"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}curve\0\u{1}x\0\u{1}y\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._curve == nil {return false}
|
||||
@@ -482,12 +437,7 @@ extension Securegcm_EcPoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplem
|
||||
|
||||
extension Securegcm_SpakeHandshakeMessage: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SpakeHandshakeMessage"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "flow_number"),
|
||||
2: .standard(proto: "ec_point"),
|
||||
3: .standard(proto: "hash_value"),
|
||||
4: .same(proto: "payload"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}flow_number\0\u{3}ec_point\0\u{3}hash_value\0\u{1}payload\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if let v = self._ecPoint, !v.isInitialized {return false}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -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: securegcm.proto
|
||||
@@ -36,278 +37,131 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
||||
|
||||
/// This enum is used by iOS devices as values for device_display_diagonal_mils
|
||||
/// in GcmDeviceInfo. There is no good way to calculate it on those devices.
|
||||
enum Securegcm_AppleDeviceDiagonalMils: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
enum Securegcm_AppleDeviceDiagonalMils: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
|
||||
/// This is the mils diagonal on an iPhone 5.
|
||||
case applePhone // = 4000
|
||||
case applePhone = 4000
|
||||
|
||||
/// This is the mils diagonal on an iPad mini.
|
||||
case applePad // = 7900
|
||||
case applePad = 7900
|
||||
|
||||
init() {
|
||||
self = .applePhone
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 4000: self = .applePhone
|
||||
case 7900: self = .applePad
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .applePhone: return 4000
|
||||
case .applePad: return 7900
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_AppleDeviceDiagonalMils: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
/// This should be kept in sync with DeviceType in:
|
||||
/// java/com/google/security/cryptauth/backend/services/common/common_enums.proto
|
||||
enum Securegcm_DeviceType: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case unknown // = 0
|
||||
case android // = 1
|
||||
case chrome // = 2
|
||||
case ios // = 3
|
||||
case browser // = 4
|
||||
case osx // = 5
|
||||
enum Securegcm_DeviceType: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case unknown = 0
|
||||
case android = 1
|
||||
case chrome = 2
|
||||
case ios = 3
|
||||
case browser = 4
|
||||
case osx = 5
|
||||
|
||||
init() {
|
||||
self = .unknown
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .unknown
|
||||
case 1: self = .android
|
||||
case 2: self = .chrome
|
||||
case 3: self = .ios
|
||||
case 4: self = .browser
|
||||
case 5: self = .osx
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .unknown: return 0
|
||||
case .android: return 1
|
||||
case .chrome: return 2
|
||||
case .ios: return 3
|
||||
case .browser: return 4
|
||||
case .osx: return 5
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_DeviceType: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
/// MultiDevice features which may be supported and enabled on a device. See
|
||||
enum Securegcm_SoftwareFeature: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case unknownFeature // = 0
|
||||
case betterTogetherHost // = 1
|
||||
case betterTogetherClient // = 2
|
||||
case easyUnlockHost // = 3
|
||||
case easyUnlockClient // = 4
|
||||
case magicTetherHost // = 5
|
||||
case magicTetherClient // = 6
|
||||
case smsConnectHost // = 7
|
||||
case smsConnectClient // = 8
|
||||
enum Securegcm_SoftwareFeature: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case unknownFeature = 0
|
||||
case betterTogetherHost = 1
|
||||
case betterTogetherClient = 2
|
||||
case easyUnlockHost = 3
|
||||
case easyUnlockClient = 4
|
||||
case magicTetherHost = 5
|
||||
case magicTetherClient = 6
|
||||
case smsConnectHost = 7
|
||||
case smsConnectClient = 8
|
||||
|
||||
init() {
|
||||
self = .unknownFeature
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .unknownFeature
|
||||
case 1: self = .betterTogetherHost
|
||||
case 2: self = .betterTogetherClient
|
||||
case 3: self = .easyUnlockHost
|
||||
case 4: self = .easyUnlockClient
|
||||
case 5: self = .magicTetherHost
|
||||
case 6: self = .magicTetherClient
|
||||
case 7: self = .smsConnectHost
|
||||
case 8: self = .smsConnectClient
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .unknownFeature: return 0
|
||||
case .betterTogetherHost: return 1
|
||||
case .betterTogetherClient: return 2
|
||||
case .easyUnlockHost: return 3
|
||||
case .easyUnlockClient: return 4
|
||||
case .magicTetherHost: return 5
|
||||
case .magicTetherClient: return 6
|
||||
case .smsConnectHost: return 7
|
||||
case .smsConnectClient: return 8
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_SoftwareFeature: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
/// A list of "reasons" that can be provided for calling server-side APIs.
|
||||
/// This is particularly important for calls that can be triggered by different
|
||||
/// kinds of events. Please try to keep reasons as generic as possible, so that
|
||||
/// codes can be re-used by various callers in a sensible fashion.
|
||||
enum Securegcm_InvocationReason: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case reasonUnknown // = 0
|
||||
enum Securegcm_InvocationReason: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case reasonUnknown = 0
|
||||
|
||||
/// First run of the software package invoking this call
|
||||
case reasonInitialization // = 1
|
||||
case reasonInitialization = 1
|
||||
|
||||
/// Ordinary periodic actions (e.g. monthly master key rotation)
|
||||
case reasonPeriodic // = 2
|
||||
case reasonPeriodic = 2
|
||||
|
||||
/// Slow-cycle periodic action (e.g. yearly keypair rotation???)
|
||||
case reasonSlowPeriodic // = 3
|
||||
case reasonSlowPeriodic = 3
|
||||
|
||||
/// Fast-cycle periodic action (e.g. daily sync for Smart Lock users)
|
||||
case reasonFastPeriodic // = 4
|
||||
case reasonFastPeriodic = 4
|
||||
|
||||
/// Expired state (e.g. expired credentials, or cached entries) was detected
|
||||
case reasonExpiration // = 5
|
||||
case reasonExpiration = 5
|
||||
|
||||
/// An unexpected protocol failure occurred (so attempting to repair state)
|
||||
case reasonFailureRecovery // = 6
|
||||
case reasonFailureRecovery = 6
|
||||
|
||||
/// A new account has been added to the device
|
||||
case reasonNewAccount // = 7
|
||||
case reasonNewAccount = 7
|
||||
|
||||
/// An existing account on the device has been changed
|
||||
case reasonChangedAccount // = 8
|
||||
case reasonChangedAccount = 8
|
||||
|
||||
/// The user toggled the state of a feature (e.g. Smart Lock enabled via BT)
|
||||
case reasonFeatureToggled // = 9
|
||||
case reasonFeatureToggled = 9
|
||||
|
||||
/// A "push" from the server caused this action (e.g. a sync tickle)
|
||||
case reasonServerInitiated // = 10
|
||||
case reasonServerInitiated = 10
|
||||
|
||||
/// A local address change triggered this (e.g. GCM registration id changed)
|
||||
case reasonAddressChange // = 11
|
||||
case reasonAddressChange = 11
|
||||
|
||||
/// A software update has triggered this
|
||||
case reasonSoftwareUpdate // = 12
|
||||
case reasonSoftwareUpdate = 12
|
||||
|
||||
/// A manual action by the user triggered this (e.g. commands sent via adb)
|
||||
case reasonManual // = 13
|
||||
case reasonManual = 13
|
||||
|
||||
/// A custom key has been invalidated on the device (e.g. screen lock is
|
||||
/// disabled).
|
||||
case reasonCustomKeyInvalidation // = 14
|
||||
case reasonCustomKeyInvalidation = 14
|
||||
|
||||
/// Periodic action triggered by auth_proximity
|
||||
case reasonProximityPeriodic // = 15
|
||||
case reasonProximityPeriodic = 15
|
||||
|
||||
init() {
|
||||
self = .reasonUnknown
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .reasonUnknown
|
||||
case 1: self = .reasonInitialization
|
||||
case 2: self = .reasonPeriodic
|
||||
case 3: self = .reasonSlowPeriodic
|
||||
case 4: self = .reasonFastPeriodic
|
||||
case 5: self = .reasonExpiration
|
||||
case 6: self = .reasonFailureRecovery
|
||||
case 7: self = .reasonNewAccount
|
||||
case 8: self = .reasonChangedAccount
|
||||
case 9: self = .reasonFeatureToggled
|
||||
case 10: self = .reasonServerInitiated
|
||||
case 11: self = .reasonAddressChange
|
||||
case 12: self = .reasonSoftwareUpdate
|
||||
case 13: self = .reasonManual
|
||||
case 14: self = .reasonCustomKeyInvalidation
|
||||
case 15: self = .reasonProximityPeriodic
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .reasonUnknown: return 0
|
||||
case .reasonInitialization: return 1
|
||||
case .reasonPeriodic: return 2
|
||||
case .reasonSlowPeriodic: return 3
|
||||
case .reasonFastPeriodic: return 4
|
||||
case .reasonExpiration: return 5
|
||||
case .reasonFailureRecovery: return 6
|
||||
case .reasonNewAccount: return 7
|
||||
case .reasonChangedAccount: return 8
|
||||
case .reasonFeatureToggled: return 9
|
||||
case .reasonServerInitiated: return 10
|
||||
case .reasonAddressChange: return 11
|
||||
case .reasonSoftwareUpdate: return 12
|
||||
case .reasonManual: return 13
|
||||
case .reasonCustomKeyInvalidation: return 14
|
||||
case .reasonProximityPeriodic: return 15
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_InvocationReason: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
enum Securegcm_Type: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case enrollment // = 0
|
||||
case tickle // = 1
|
||||
case txRequest // = 2
|
||||
case txReply // = 3
|
||||
case txSyncRequest // = 4
|
||||
case txSyncResponse // = 5
|
||||
case txPing // = 6
|
||||
case deviceInfoUpdate // = 7
|
||||
case txCancelRequest // = 8
|
||||
enum Securegcm_Type: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case enrollment = 0
|
||||
case tickle = 1
|
||||
case txRequest = 2
|
||||
case txReply = 3
|
||||
case txSyncRequest = 4
|
||||
case txSyncResponse = 5
|
||||
case txPing = 6
|
||||
case deviceInfoUpdate = 7
|
||||
case txCancelRequest = 8
|
||||
|
||||
/// DEPRECATED (can be re-used after Aug 2015)
|
||||
case proximityauthPairing // = 10
|
||||
case proximityauthPairing = 10
|
||||
|
||||
/// The kind of identity assertion generated by a "GCM V1" device (i.e.,
|
||||
/// an Android phone that has registered with us a public and a symmetric
|
||||
/// key)
|
||||
case gcmv1IdentityAssertion // = 11
|
||||
case gcmv1IdentityAssertion = 11
|
||||
|
||||
/// Device-to-device communications are protected by an unauthenticated
|
||||
/// Diffie-Hellman exchange. The InitiatorHello message is simply the
|
||||
@@ -318,87 +172,36 @@ enum Securegcm_Type: SwiftProtobuf.Enum {
|
||||
/// by the derived shared key. It also contains the responder's
|
||||
/// public DH key. ResponderHelloAndPayload messages have the
|
||||
/// DEVICE_TO_DEVICE_RESPONDER_HELLO tag.
|
||||
case deviceToDeviceResponderHelloPayload // = 12
|
||||
case deviceToDeviceResponderHelloPayload = 12
|
||||
|
||||
/// Device-to-device communications are protected by an unauthenticated
|
||||
/// Diffie-Hellman exchange. Once the initiator and responder
|
||||
/// agree on a shared key (through Diffie-Hellman), they will use messages
|
||||
/// tagged with DEVICE_TO_DEVICE_MESSAGE to exchange data.
|
||||
case deviceToDeviceMessage // = 13
|
||||
case deviceToDeviceMessage = 13
|
||||
|
||||
/// Notification to let a device know it should contact a nearby device.
|
||||
case deviceProximityCallback // = 14
|
||||
case deviceProximityCallback = 14
|
||||
|
||||
/// Device-to-device communications are protected by an unauthenticated
|
||||
/// Diffie-Hellman exchange. During device-to-device authentication, the first
|
||||
/// message from initiator (the challenge) is signed and put into the payload
|
||||
/// of the message sent back to the initiator.
|
||||
case unlockKeySignedChallenge // = 15
|
||||
case unlockKeySignedChallenge = 15
|
||||
|
||||
/// Specialty (corp only) features
|
||||
case loginNotification // = 101
|
||||
case loginNotification = 101
|
||||
|
||||
init() {
|
||||
self = .enrollment
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .enrollment
|
||||
case 1: self = .tickle
|
||||
case 2: self = .txRequest
|
||||
case 3: self = .txReply
|
||||
case 4: self = .txSyncRequest
|
||||
case 5: self = .txSyncResponse
|
||||
case 6: self = .txPing
|
||||
case 7: self = .deviceInfoUpdate
|
||||
case 8: self = .txCancelRequest
|
||||
case 10: self = .proximityauthPairing
|
||||
case 11: self = .gcmv1IdentityAssertion
|
||||
case 12: self = .deviceToDeviceResponderHelloPayload
|
||||
case 13: self = .deviceToDeviceMessage
|
||||
case 14: self = .deviceProximityCallback
|
||||
case 15: self = .unlockKeySignedChallenge
|
||||
case 101: self = .loginNotification
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .enrollment: return 0
|
||||
case .tickle: return 1
|
||||
case .txRequest: return 2
|
||||
case .txReply: return 3
|
||||
case .txSyncRequest: return 4
|
||||
case .txSyncResponse: return 5
|
||||
case .txPing: return 6
|
||||
case .deviceInfoUpdate: return 7
|
||||
case .txCancelRequest: return 8
|
||||
case .proximityauthPairing: return 10
|
||||
case .gcmv1IdentityAssertion: return 11
|
||||
case .deviceToDeviceResponderHelloPayload: return 12
|
||||
case .deviceToDeviceMessage: return 13
|
||||
case .deviceProximityCallback: return 14
|
||||
case .unlockKeySignedChallenge: return 15
|
||||
case .loginNotification: return 101
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_Type: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
/// Message used only during enrollment
|
||||
/// Field numbers should be kept in sync with DeviceInfo in:
|
||||
/// java/com/google/security/cryptauth/backend/services/common/common.proto
|
||||
struct Securegcm_GcmDeviceInfo {
|
||||
struct Securegcm_GcmDeviceInfo: @unchecked 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.
|
||||
@@ -798,7 +601,7 @@ struct Securegcm_GcmDeviceInfo {
|
||||
fileprivate var _storage = _StorageClass.defaultInstance
|
||||
}
|
||||
|
||||
struct Securegcm_GcmMetadata {
|
||||
struct Securegcm_GcmMetadata: 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.
|
||||
@@ -829,7 +632,7 @@ struct Securegcm_GcmMetadata {
|
||||
fileprivate var _version: Int32? = nil
|
||||
}
|
||||
|
||||
struct Securegcm_Tickle {
|
||||
struct Securegcm_Tickle: 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.
|
||||
@@ -851,7 +654,7 @@ struct Securegcm_Tickle {
|
||||
fileprivate var _expiryTime: UInt64? = nil
|
||||
}
|
||||
|
||||
struct Securegcm_LoginNotificationInfo {
|
||||
struct Securegcm_LoginNotificationInfo: 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.
|
||||
@@ -917,138 +720,33 @@ struct Securegcm_LoginNotificationInfo {
|
||||
fileprivate var _eventType: String? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension Securegcm_AppleDeviceDiagonalMils: @unchecked Sendable {}
|
||||
extension Securegcm_DeviceType: @unchecked Sendable {}
|
||||
extension Securegcm_SoftwareFeature: @unchecked Sendable {}
|
||||
extension Securegcm_InvocationReason: @unchecked Sendable {}
|
||||
extension Securegcm_Type: @unchecked Sendable {}
|
||||
extension Securegcm_GcmDeviceInfo: @unchecked Sendable {}
|
||||
extension Securegcm_GcmMetadata: @unchecked Sendable {}
|
||||
extension Securegcm_Tickle: @unchecked Sendable {}
|
||||
extension Securegcm_LoginNotificationInfo: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "securegcm"
|
||||
|
||||
extension Securegcm_AppleDeviceDiagonalMils: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
4000: .same(proto: "APPLE_PHONE"),
|
||||
7900: .same(proto: "APPLE_PAD"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}`>APPLE_PHONE\0\u{2}|<APPLE_PAD\0")
|
||||
}
|
||||
|
||||
extension Securegcm_DeviceType: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "UNKNOWN"),
|
||||
1: .same(proto: "ANDROID"),
|
||||
2: .same(proto: "CHROME"),
|
||||
3: .same(proto: "IOS"),
|
||||
4: .same(proto: "BROWSER"),
|
||||
5: .same(proto: "OSX"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN\0\u{1}ANDROID\0\u{1}CHROME\0\u{1}IOS\0\u{1}BROWSER\0\u{1}OSX\0")
|
||||
}
|
||||
|
||||
extension Securegcm_SoftwareFeature: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "UNKNOWN_FEATURE"),
|
||||
1: .same(proto: "BETTER_TOGETHER_HOST"),
|
||||
2: .same(proto: "BETTER_TOGETHER_CLIENT"),
|
||||
3: .same(proto: "EASY_UNLOCK_HOST"),
|
||||
4: .same(proto: "EASY_UNLOCK_CLIENT"),
|
||||
5: .same(proto: "MAGIC_TETHER_HOST"),
|
||||
6: .same(proto: "MAGIC_TETHER_CLIENT"),
|
||||
7: .same(proto: "SMS_CONNECT_HOST"),
|
||||
8: .same(proto: "SMS_CONNECT_CLIENT"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_FEATURE\0\u{1}BETTER_TOGETHER_HOST\0\u{1}BETTER_TOGETHER_CLIENT\0\u{1}EASY_UNLOCK_HOST\0\u{1}EASY_UNLOCK_CLIENT\0\u{1}MAGIC_TETHER_HOST\0\u{1}MAGIC_TETHER_CLIENT\0\u{1}SMS_CONNECT_HOST\0\u{1}SMS_CONNECT_CLIENT\0")
|
||||
}
|
||||
|
||||
extension Securegcm_InvocationReason: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "REASON_UNKNOWN"),
|
||||
1: .same(proto: "REASON_INITIALIZATION"),
|
||||
2: .same(proto: "REASON_PERIODIC"),
|
||||
3: .same(proto: "REASON_SLOW_PERIODIC"),
|
||||
4: .same(proto: "REASON_FAST_PERIODIC"),
|
||||
5: .same(proto: "REASON_EXPIRATION"),
|
||||
6: .same(proto: "REASON_FAILURE_RECOVERY"),
|
||||
7: .same(proto: "REASON_NEW_ACCOUNT"),
|
||||
8: .same(proto: "REASON_CHANGED_ACCOUNT"),
|
||||
9: .same(proto: "REASON_FEATURE_TOGGLED"),
|
||||
10: .same(proto: "REASON_SERVER_INITIATED"),
|
||||
11: .same(proto: "REASON_ADDRESS_CHANGE"),
|
||||
12: .same(proto: "REASON_SOFTWARE_UPDATE"),
|
||||
13: .same(proto: "REASON_MANUAL"),
|
||||
14: .same(proto: "REASON_CUSTOM_KEY_INVALIDATION"),
|
||||
15: .same(proto: "REASON_PROXIMITY_PERIODIC"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0REASON_UNKNOWN\0\u{1}REASON_INITIALIZATION\0\u{1}REASON_PERIODIC\0\u{1}REASON_SLOW_PERIODIC\0\u{1}REASON_FAST_PERIODIC\0\u{1}REASON_EXPIRATION\0\u{1}REASON_FAILURE_RECOVERY\0\u{1}REASON_NEW_ACCOUNT\0\u{1}REASON_CHANGED_ACCOUNT\0\u{1}REASON_FEATURE_TOGGLED\0\u{1}REASON_SERVER_INITIATED\0\u{1}REASON_ADDRESS_CHANGE\0\u{1}REASON_SOFTWARE_UPDATE\0\u{1}REASON_MANUAL\0\u{1}REASON_CUSTOM_KEY_INVALIDATION\0\u{1}REASON_PROXIMITY_PERIODIC\0")
|
||||
}
|
||||
|
||||
extension Securegcm_Type: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "ENROLLMENT"),
|
||||
1: .same(proto: "TICKLE"),
|
||||
2: .same(proto: "TX_REQUEST"),
|
||||
3: .same(proto: "TX_REPLY"),
|
||||
4: .same(proto: "TX_SYNC_REQUEST"),
|
||||
5: .same(proto: "TX_SYNC_RESPONSE"),
|
||||
6: .same(proto: "TX_PING"),
|
||||
7: .same(proto: "DEVICE_INFO_UPDATE"),
|
||||
8: .same(proto: "TX_CANCEL_REQUEST"),
|
||||
10: .same(proto: "PROXIMITYAUTH_PAIRING"),
|
||||
11: .same(proto: "GCMV1_IDENTITY_ASSERTION"),
|
||||
12: .same(proto: "DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD"),
|
||||
13: .same(proto: "DEVICE_TO_DEVICE_MESSAGE"),
|
||||
14: .same(proto: "DEVICE_PROXIMITY_CALLBACK"),
|
||||
15: .same(proto: "UNLOCK_KEY_SIGNED_CHALLENGE"),
|
||||
101: .same(proto: "LOGIN_NOTIFICATION"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0ENROLLMENT\0\u{1}TICKLE\0\u{1}TX_REQUEST\0\u{1}TX_REPLY\0\u{1}TX_SYNC_REQUEST\0\u{1}TX_SYNC_RESPONSE\0\u{1}TX_PING\0\u{1}DEVICE_INFO_UPDATE\0\u{1}TX_CANCEL_REQUEST\0\u{2}\u{2}PROXIMITYAUTH_PAIRING\0\u{1}GCMV1_IDENTITY_ASSERTION\0\u{1}DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD\0\u{1}DEVICE_TO_DEVICE_MESSAGE\0\u{1}DEVICE_PROXIMITY_CALLBACK\0\u{1}UNLOCK_KEY_SIGNED_CHALLENGE\0\u{2}V\u{1}LOGIN_NOTIFICATION\0")
|
||||
}
|
||||
|
||||
extension Securegcm_GcmDeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".GcmDeviceInfo"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "android_device_id"),
|
||||
102: .standard(proto: "gcm_registration_id"),
|
||||
202: .standard(proto: "apn_registration_id"),
|
||||
203: .standard(proto: "notification_enabled"),
|
||||
302: .standard(proto: "bluetooth_mac_address"),
|
||||
103: .standard(proto: "device_master_key_hash"),
|
||||
4: .standard(proto: "user_public_key"),
|
||||
7: .standard(proto: "device_model"),
|
||||
8: .same(proto: "locale"),
|
||||
9: .standard(proto: "key_handle"),
|
||||
12: .same(proto: "counter"),
|
||||
13: .standard(proto: "device_os_version"),
|
||||
14: .standard(proto: "device_os_version_code"),
|
||||
15: .standard(proto: "device_os_release"),
|
||||
16: .standard(proto: "device_os_codename"),
|
||||
17: .standard(proto: "device_software_version"),
|
||||
18: .standard(proto: "device_software_version_code"),
|
||||
19: .standard(proto: "device_software_package"),
|
||||
22: .standard(proto: "device_display_diagonal_mils"),
|
||||
24: .standard(proto: "device_authzen_version"),
|
||||
29: .standard(proto: "long_device_id"),
|
||||
31: .standard(proto: "device_manufacturer"),
|
||||
32: .standard(proto: "device_type"),
|
||||
400: .standard(proto: "using_secure_screenlock"),
|
||||
401: .standard(proto: "auto_unlock_screenlock_supported"),
|
||||
402: .standard(proto: "auto_unlock_screenlock_enabled"),
|
||||
403: .standard(proto: "bluetooth_radio_supported"),
|
||||
404: .standard(proto: "bluetooth_radio_enabled"),
|
||||
405: .standard(proto: "mobile_data_supported"),
|
||||
406: .standard(proto: "tethering_supported"),
|
||||
407: .standard(proto: "ble_radio_supported"),
|
||||
408: .standard(proto: "pixel_experience"),
|
||||
409: .standard(proto: "arc_plus_plus"),
|
||||
410: .standard(proto: "is_screenlock_state_flaky"),
|
||||
411: .standard(proto: "supported_software_features"),
|
||||
412: .standard(proto: "enabled_software_features"),
|
||||
1000: .standard(proto: "enrollment_session_id"),
|
||||
1001: .standard(proto: "oauth_token"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}android_device_id\0\u{4}\u{3}user_public_key\0\u{4}\u{3}device_model\0\u{1}locale\0\u{3}key_handle\0\u{2}\u{3}counter\0\u{3}device_os_version\0\u{3}device_os_version_code\0\u{3}device_os_release\0\u{3}device_os_codename\0\u{3}device_software_version\0\u{3}device_software_version_code\0\u{3}device_software_package\0\u{4}\u{3}device_display_diagonal_mils\0\u{4}\u{2}device_authzen_version\0\u{4}\u{5}long_device_id\0\u{4}\u{2}device_manufacturer\0\u{3}device_type\0\u{4}F\u{1}gcm_registration_id\0\u{3}device_master_key_hash\0\u{4}c\u{1}apn_registration_id\0\u{3}notification_enabled\0\u{4}c\u{1}bluetooth_mac_address\0\u{4}b\u{1}using_secure_screenlock\0\u{3}auto_unlock_screenlock_supported\0\u{3}auto_unlock_screenlock_enabled\0\u{3}bluetooth_radio_supported\0\u{3}bluetooth_radio_enabled\0\u{3}mobile_data_supported\0\u{3}tethering_supported\0\u{3}ble_radio_supported\0\u{3}pixel_experience\0\u{3}arc_plus_plus\0\u{3}is_screenlock_state_flaky\0\u{3}supported_software_features\0\u{3}enabled_software_features\0\u{4}L\u{9}enrollment_session_id\0\u{3}oauth_token\0")
|
||||
|
||||
fileprivate class _StorageClass {
|
||||
var _androidDeviceID: UInt64? = nil
|
||||
@@ -1090,7 +788,11 @@ extension Securegcm_GcmDeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._Message
|
||||
var _enrollmentSessionID: Data? = nil
|
||||
var _oauthToken: String? = nil
|
||||
|
||||
static let defaultInstance = _StorageClass()
|
||||
// This property is used as the initial default value for new instances of the type.
|
||||
// The type itself is protecting the reference to its storage via CoW semantics.
|
||||
// This will force a copy to be made of this reference when the first mutation occurs;
|
||||
// hence, it is safe to mark this as `nonisolated(unsafe)`.
|
||||
static nonisolated(unsafe) let defaultInstance = _StorageClass()
|
||||
|
||||
private init() {}
|
||||
|
||||
@@ -1380,10 +1082,7 @@ extension Securegcm_GcmDeviceInfo: SwiftProtobuf.Message, SwiftProtobuf._Message
|
||||
|
||||
extension Securegcm_GcmMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".GcmMetadata"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "type"),
|
||||
2: .same(proto: "version"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{1}version\0")
|
||||
|
||||
public var isInitialized: Bool {
|
||||
if self._type == nil {return false}
|
||||
@@ -1427,9 +1126,7 @@ extension Securegcm_GcmMetadata: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
|
||||
|
||||
extension Securegcm_Tickle: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Tickle"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "expiry_time"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}expiry_time\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -1463,13 +1160,7 @@ extension Securegcm_Tickle: SwiftProtobuf.Message, SwiftProtobuf._MessageImpleme
|
||||
|
||||
extension Securegcm_LoginNotificationInfo: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".LoginNotificationInfo"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
2: .standard(proto: "creation_time"),
|
||||
3: .same(proto: "email"),
|
||||
4: .same(proto: "host"),
|
||||
5: .same(proto: "source"),
|
||||
6: .standard(proto: "event_type"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{4}\u{2}creation_time\0\u{1}email\0\u{1}host\0\u{1}source\0\u{3}event_type\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
|
||||
@@ -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}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -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: ukey.proto
|
||||
@@ -34,48 +35,22 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
enum Securegcm_Ukey2HandshakeCipher: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case reserved // = 0
|
||||
enum Securegcm_Ukey2HandshakeCipher: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case reserved = 0
|
||||
|
||||
/// NIST P-256 used for ECDH, SHA512 used for
|
||||
case p256Sha512 // = 100
|
||||
case p256Sha512 = 100
|
||||
|
||||
/// commitment
|
||||
case curve25519Sha512 // = 200
|
||||
case curve25519Sha512 = 200
|
||||
|
||||
init() {
|
||||
self = .reserved
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .reserved
|
||||
case 100: self = .p256Sha512
|
||||
case 200: self = .curve25519Sha512
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .reserved: return 0
|
||||
case .p256Sha512: return 100
|
||||
case .curve25519Sha512: return 200
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_Ukey2HandshakeCipher: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
struct Securegcm_Ukey2Message {
|
||||
struct Securegcm_Ukey2Message: 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.
|
||||
@@ -102,39 +77,17 @@ struct Securegcm_Ukey2Message {
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
enum TypeEnum: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case unknownDoNotUse // = 0
|
||||
case alert // = 1
|
||||
case clientInit // = 2
|
||||
case serverInit // = 3
|
||||
case clientFinish // = 4
|
||||
enum TypeEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case unknownDoNotUse = 0
|
||||
case alert = 1
|
||||
case clientInit = 2
|
||||
case serverInit = 3
|
||||
case clientFinish = 4
|
||||
|
||||
init() {
|
||||
self = .unknownDoNotUse
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .unknownDoNotUse
|
||||
case 1: self = .alert
|
||||
case 2: self = .clientInit
|
||||
case 3: self = .serverInit
|
||||
case 4: self = .clientFinish
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .unknownDoNotUse: return 0
|
||||
case .alert: return 1
|
||||
case .clientInit: return 2
|
||||
case .serverInit: return 3
|
||||
case .clientFinish: return 4
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
init() {}
|
||||
@@ -143,15 +96,7 @@ struct Securegcm_Ukey2Message {
|
||||
fileprivate var _messageData: Data? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_Ukey2Message.TypeEnum: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
struct Securegcm_Ukey2Alert {
|
||||
struct Securegcm_Ukey2Alert: 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.
|
||||
@@ -176,74 +121,42 @@ struct Securegcm_Ukey2Alert {
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
enum AlertType: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
enum AlertType: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
|
||||
/// Framing errors
|
||||
case badMessage // = 1
|
||||
case badMessage = 1
|
||||
|
||||
/// message_type has an undefined value
|
||||
case badMessageType // = 2
|
||||
case badMessageType = 2
|
||||
|
||||
/// message_type received does not correspond to
|
||||
case incorrectMessage // = 3
|
||||
case incorrectMessage = 3
|
||||
|
||||
/// expected type at this stage of the protocol
|
||||
case badMessageData // = 4
|
||||
case badMessageData = 4
|
||||
|
||||
/// ClientInit and ServerInit errors
|
||||
case badVersion // = 100
|
||||
case badVersion = 100
|
||||
|
||||
/// suitable version to speak with client.
|
||||
case badRandom // = 101
|
||||
case badRandom = 101
|
||||
|
||||
/// length
|
||||
case badHandshakeCipher // = 102
|
||||
case badHandshakeCipher = 102
|
||||
|
||||
/// The next protocol is missing, unknown, or
|
||||
case badNextProtocol // = 103
|
||||
case badNextProtocol = 103
|
||||
|
||||
/// unsupported
|
||||
case badPublicKey // = 104
|
||||
case badPublicKey = 104
|
||||
|
||||
/// Other errors
|
||||
case internalError // = 200
|
||||
case internalError = 200
|
||||
|
||||
init() {
|
||||
self = .badMessage
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 1: self = .badMessage
|
||||
case 2: self = .badMessageType
|
||||
case 3: self = .incorrectMessage
|
||||
case 4: self = .badMessageData
|
||||
case 100: self = .badVersion
|
||||
case 101: self = .badRandom
|
||||
case 102: self = .badHandshakeCipher
|
||||
case 103: self = .badNextProtocol
|
||||
case 104: self = .badPublicKey
|
||||
case 200: self = .internalError
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .badMessage: return 1
|
||||
case .badMessageType: return 2
|
||||
case .incorrectMessage: return 3
|
||||
case .badMessageData: return 4
|
||||
case .badVersion: return 100
|
||||
case .badRandom: return 101
|
||||
case .badHandshakeCipher: return 102
|
||||
case .badNextProtocol: return 103
|
||||
case .badPublicKey: return 104
|
||||
case .internalError: return 200
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
init() {}
|
||||
@@ -252,15 +165,7 @@ struct Securegcm_Ukey2Alert {
|
||||
fileprivate var _errorMessage: String? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_Ukey2Alert.AlertType: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
struct Securegcm_Ukey2ClientInit {
|
||||
struct Securegcm_Ukey2ClientInit: 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.
|
||||
@@ -301,7 +206,7 @@ struct Securegcm_Ukey2ClientInit {
|
||||
|
||||
/// One commitment (hash of ClientFinished containing public key) per supported
|
||||
/// cipher
|
||||
struct CipherCommitment {
|
||||
struct CipherCommitment: 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.
|
||||
@@ -339,7 +244,7 @@ struct Securegcm_Ukey2ClientInit {
|
||||
fileprivate var _nextProtocol: String? = nil
|
||||
}
|
||||
|
||||
struct Securegcm_Ukey2ServerInit {
|
||||
struct Securegcm_Ukey2ServerInit: 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.
|
||||
@@ -393,7 +298,7 @@ struct Securegcm_Ukey2ServerInit {
|
||||
fileprivate var _publicKey: Data? = nil
|
||||
}
|
||||
|
||||
struct Securegcm_Ukey2ClientFinished {
|
||||
struct Securegcm_Ukey2ClientFinished: 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.
|
||||
@@ -415,36 +320,17 @@ struct Securegcm_Ukey2ClientFinished {
|
||||
fileprivate var _publicKey: Data? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension Securegcm_Ukey2HandshakeCipher: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2Message: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2Message.TypeEnum: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2Alert: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2Alert.AlertType: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2ClientInit: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2ClientInit.CipherCommitment: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2ServerInit: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2ClientFinished: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "securegcm"
|
||||
|
||||
extension Securegcm_Ukey2HandshakeCipher: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "RESERVED"),
|
||||
100: .same(proto: "P256_SHA512"),
|
||||
200: .same(proto: "CURVE25519_SHA512"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0RESERVED\0\u{2}d\u{1}P256_SHA512\0\u{2}d\u{1}CURVE25519_SHA512\0")
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2Message"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "message_type"),
|
||||
2: .standard(proto: "message_data"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}message_type\0\u{3}message_data\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -482,21 +368,12 @@ extension Securegcm_Ukey2Message: SwiftProtobuf.Message, SwiftProtobuf._MessageI
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2Message.TypeEnum: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "UNKNOWN_DO_NOT_USE"),
|
||||
1: .same(proto: "ALERT"),
|
||||
2: .same(proto: "CLIENT_INIT"),
|
||||
3: .same(proto: "SERVER_INIT"),
|
||||
4: .same(proto: "CLIENT_FINISH"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_DO_NOT_USE\0\u{1}ALERT\0\u{1}CLIENT_INIT\0\u{1}SERVER_INIT\0\u{1}CLIENT_FINISH\0")
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2Alert: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2Alert"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "type"),
|
||||
2: .standard(proto: "error_message"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}error_message\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -534,28 +411,12 @@ extension Securegcm_Ukey2Alert: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2Alert.AlertType: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "BAD_MESSAGE"),
|
||||
2: .same(proto: "BAD_MESSAGE_TYPE"),
|
||||
3: .same(proto: "INCORRECT_MESSAGE"),
|
||||
4: .same(proto: "BAD_MESSAGE_DATA"),
|
||||
100: .same(proto: "BAD_VERSION"),
|
||||
101: .same(proto: "BAD_RANDOM"),
|
||||
102: .same(proto: "BAD_HANDSHAKE_CIPHER"),
|
||||
103: .same(proto: "BAD_NEXT_PROTOCOL"),
|
||||
104: .same(proto: "BAD_PUBLIC_KEY"),
|
||||
200: .same(proto: "INTERNAL_ERROR"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}BAD_MESSAGE\0\u{1}BAD_MESSAGE_TYPE\0\u{1}INCORRECT_MESSAGE\0\u{1}BAD_MESSAGE_DATA\0\u{2}`\u{1}BAD_VERSION\0\u{1}BAD_RANDOM\0\u{1}BAD_HANDSHAKE_CIPHER\0\u{1}BAD_NEXT_PROTOCOL\0\u{1}BAD_PUBLIC_KEY\0\u{2}`\u{1}INTERNAL_ERROR\0")
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2ClientInit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2ClientInit"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "version"),
|
||||
2: .same(proto: "random"),
|
||||
3: .standard(proto: "cipher_commitments"),
|
||||
4: .standard(proto: "next_protocol"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}random\0\u{3}cipher_commitments\0\u{3}next_protocol\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -604,10 +465,7 @@ extension Securegcm_Ukey2ClientInit: SwiftProtobuf.Message, SwiftProtobuf._Messa
|
||||
|
||||
extension Securegcm_Ukey2ClientInit.CipherCommitment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = Securegcm_Ukey2ClientInit.protoMessageName + ".CipherCommitment"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "handshake_cipher"),
|
||||
2: .same(proto: "commitment"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}handshake_cipher\0\u{1}commitment\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -646,12 +504,7 @@ extension Securegcm_Ukey2ClientInit.CipherCommitment: SwiftProtobuf.Message, Swi
|
||||
|
||||
extension Securegcm_Ukey2ServerInit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2ServerInit"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "version"),
|
||||
2: .same(proto: "random"),
|
||||
3: .standard(proto: "handshake_cipher"),
|
||||
4: .standard(proto: "public_key"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}random\0\u{3}handshake_cipher\0\u{3}public_key\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -700,9 +553,7 @@ extension Securegcm_Ukey2ServerInit: SwiftProtobuf.Message, SwiftProtobuf._Messa
|
||||
|
||||
extension Securegcm_Ukey2ClientFinished: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2ClientFinished"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "public_key"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_key\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1242,7 +1242,7 @@
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
SHARED_BUILD = 63;
|
||||
SHARED_VERSION = 2.1;
|
||||
SHARED_VERSION = 2.2;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
@@ -1304,7 +1304,7 @@
|
||||
MTL_FAST_MATH = YES;
|
||||
SDKROOT = macosx;
|
||||
SHARED_BUILD = 63;
|
||||
SHARED_VERSION = 2.1;
|
||||
SHARED_VERSION = 2.2;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_EMIT_LOC_STRINGS = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-O";
|
||||
|
||||
@@ -87,8 +87,8 @@
|
||||
"kind" : "remoteSourceControl",
|
||||
"location" : "https://github.com/apple/swift-protobuf.git",
|
||||
"state" : {
|
||||
"revision" : "102a647b573f60f73afdce5613a51d71349fe507",
|
||||
"version" : "1.30.0"
|
||||
"revision" : "e3f69fd321d0c9fcdc16fb576a0cdd956675face",
|
||||
"version" : "1.31.0"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -56,7 +56,7 @@ struct DeviceListView: View {
|
||||
|
||||
let attachments = nearbyConnectionManager.attachments
|
||||
|
||||
FooterView(text: attachments == nil ? "YouAreVisibleAs".localized() : "YouAreSending".localized())
|
||||
FormHeader(name: attachments == nil ? "YouAreVisibleAs".localized() : "YouAreSending".localized())
|
||||
|
||||
HStack {
|
||||
|
||||
@@ -74,8 +74,8 @@ struct DeviceListView: View {
|
||||
.padding(.vertical, 6)
|
||||
.background(Color.defaultForegroundColor)
|
||||
.cornerRadius(24)
|
||||
.padding(.horizontal)
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.top, 8)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
|
||||
Reference in new issue
Block a user