2018-09-24 18:07:34 +00:00
|
|
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
|
// source: encryption.proto
|
|
|
|
|
|
|
|
package chat
|
|
|
|
|
2018-11-06 08:05:32 +00:00
|
|
|
import (
|
|
|
|
fmt "fmt"
|
|
|
|
proto "github.com/golang/protobuf/proto"
|
|
|
|
math "math"
|
|
|
|
)
|
2018-09-24 18:07:34 +00:00
|
|
|
|
|
|
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
|
|
var _ = proto.Marshal
|
|
|
|
var _ = fmt.Errorf
|
|
|
|
var _ = math.Inf
|
|
|
|
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
|
|
// is compatible with the proto package it is being compiled against.
|
|
|
|
// A compilation error at this line likely means your copy of the
|
|
|
|
// proto package needs to be updated.
|
|
|
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
|
|
|
|
|
|
|
type SignedPreKey struct {
|
|
|
|
SignedPreKey []byte `protobuf:"bytes,1,opt,name=signed_pre_key,json=signedPreKey,proto3" json:"signed_pre_key,omitempty"`
|
|
|
|
Version uint32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignedPreKey) Reset() { *m = SignedPreKey{} }
|
|
|
|
func (m *SignedPreKey) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*SignedPreKey) ProtoMessage() {}
|
|
|
|
func (*SignedPreKey) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8293a649ce9418c6, []int{0}
|
|
|
|
}
|
2018-11-06 08:05:32 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *SignedPreKey) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_SignedPreKey.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *SignedPreKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_SignedPreKey.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *SignedPreKey) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_SignedPreKey.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *SignedPreKey) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_SignedPreKey.Size(m)
|
|
|
|
}
|
|
|
|
func (m *SignedPreKey) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_SignedPreKey.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_SignedPreKey proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *SignedPreKey) GetSignedPreKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.SignedPreKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *SignedPreKey) GetVersion() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Version
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
// X3DH prekey bundle
|
|
|
|
type Bundle struct {
|
|
|
|
// Identity key
|
|
|
|
Identity []byte `protobuf:"bytes,1,opt,name=identity,proto3" json:"identity,omitempty"`
|
|
|
|
// Installation id
|
|
|
|
SignedPreKeys map[string]*SignedPreKey `protobuf:"bytes,2,rep,name=signed_pre_keys,json=signedPreKeys,proto3" json:"signed_pre_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
// Prekey signature
|
2018-11-06 08:05:32 +00:00
|
|
|
Signature []byte `protobuf:"bytes,4,opt,name=signature,proto3" json:"signature,omitempty"`
|
|
|
|
// When the bundle was created locally
|
|
|
|
Timestamp int64 `protobuf:"varint,5,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Bundle) Reset() { *m = Bundle{} }
|
|
|
|
func (m *Bundle) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*Bundle) ProtoMessage() {}
|
|
|
|
func (*Bundle) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8293a649ce9418c6, []int{1}
|
|
|
|
}
|
2018-11-06 08:05:32 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *Bundle) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_Bundle.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *Bundle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_Bundle.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *Bundle) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_Bundle.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *Bundle) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_Bundle.Size(m)
|
|
|
|
}
|
|
|
|
func (m *Bundle) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_Bundle.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_Bundle proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *Bundle) GetIdentity() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Identity
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Bundle) GetSignedPreKeys() map[string]*SignedPreKey {
|
|
|
|
if m != nil {
|
|
|
|
return m.SignedPreKeys
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Bundle) GetSignature() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Signature
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-11-06 08:05:32 +00:00
|
|
|
func (m *Bundle) GetTimestamp() int64 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Timestamp
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
type BundleContainer struct {
|
|
|
|
// X3DH prekey bundle
|
|
|
|
Bundle *Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"`
|
|
|
|
// Private signed prekey
|
2018-11-06 08:05:32 +00:00
|
|
|
PrivateSignedPreKey []byte `protobuf:"bytes,2,opt,name=private_signed_pre_key,json=privateSignedPreKey,proto3" json:"private_signed_pre_key,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *BundleContainer) Reset() { *m = BundleContainer{} }
|
|
|
|
func (m *BundleContainer) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*BundleContainer) ProtoMessage() {}
|
|
|
|
func (*BundleContainer) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8293a649ce9418c6, []int{2}
|
|
|
|
}
|
2018-11-06 08:05:32 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *BundleContainer) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_BundleContainer.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *BundleContainer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_BundleContainer.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *BundleContainer) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_BundleContainer.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *BundleContainer) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_BundleContainer.Size(m)
|
|
|
|
}
|
|
|
|
func (m *BundleContainer) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_BundleContainer.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_BundleContainer proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *BundleContainer) GetBundle() *Bundle {
|
|
|
|
if m != nil {
|
|
|
|
return m.Bundle
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *BundleContainer) GetPrivateSignedPreKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.PrivateSignedPreKey
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type DRHeader struct {
|
|
|
|
// Current ratchet public key
|
|
|
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
|
|
// Number of the message in the sending chain
|
|
|
|
N uint32 `protobuf:"varint,2,opt,name=n,proto3" json:"n,omitempty"`
|
|
|
|
// Length of the previous sending chain
|
|
|
|
Pn uint32 `protobuf:"varint,3,opt,name=pn,proto3" json:"pn,omitempty"`
|
|
|
|
// Bundle ID
|
|
|
|
Id []byte `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DRHeader) Reset() { *m = DRHeader{} }
|
|
|
|
func (m *DRHeader) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DRHeader) ProtoMessage() {}
|
|
|
|
func (*DRHeader) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8293a649ce9418c6, []int{3}
|
|
|
|
}
|
2018-11-06 08:05:32 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *DRHeader) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DRHeader.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DRHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DRHeader.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *DRHeader) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DRHeader.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *DRHeader) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DRHeader.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DRHeader) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DRHeader.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DRHeader proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *DRHeader) GetKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Key
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DRHeader) GetN() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.N
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DRHeader) GetPn() uint32 {
|
|
|
|
if m != nil {
|
|
|
|
return m.Pn
|
|
|
|
}
|
|
|
|
return 0
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DRHeader) GetId() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type DHHeader struct {
|
|
|
|
// Compressed ephemeral public key
|
|
|
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DHHeader) Reset() { *m = DHHeader{} }
|
|
|
|
func (m *DHHeader) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DHHeader) ProtoMessage() {}
|
|
|
|
func (*DHHeader) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8293a649ce9418c6, []int{4}
|
|
|
|
}
|
2018-11-06 08:05:32 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *DHHeader) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DHHeader.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DHHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DHHeader.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *DHHeader) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DHHeader.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *DHHeader) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DHHeader.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DHHeader) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DHHeader.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DHHeader proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *DHHeader) GetKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Key
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type X3DHHeader struct {
|
|
|
|
// Ephemeral key used
|
|
|
|
Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
|
|
|
|
// Used bundle's signed prekey
|
2018-11-06 08:05:32 +00:00
|
|
|
Id []byte `protobuf:"bytes,4,opt,name=id,proto3" json:"id,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *X3DHHeader) Reset() { *m = X3DHHeader{} }
|
|
|
|
func (m *X3DHHeader) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*X3DHHeader) ProtoMessage() {}
|
|
|
|
func (*X3DHHeader) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8293a649ce9418c6, []int{5}
|
|
|
|
}
|
2018-11-06 08:05:32 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *X3DHHeader) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_X3DHHeader.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *X3DHHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_X3DHHeader.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *X3DHHeader) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_X3DHHeader.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *X3DHHeader) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_X3DHHeader.Size(m)
|
|
|
|
}
|
|
|
|
func (m *X3DHHeader) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_X3DHHeader.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_X3DHHeader proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *X3DHHeader) GetKey() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Key
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *X3DHHeader) GetId() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Id
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Direct message value
|
|
|
|
type DirectMessageProtocol struct {
|
2018-10-16 10:31:05 +00:00
|
|
|
X3DHHeader *X3DHHeader `protobuf:"bytes,1,opt,name=X3DH_header,json=X3DHHeader,proto3" json:"X3DH_header,omitempty"`
|
|
|
|
DRHeader *DRHeader `protobuf:"bytes,2,opt,name=DR_header,json=DRHeader,proto3" json:"DR_header,omitempty"`
|
|
|
|
DHHeader *DHHeader `protobuf:"bytes,101,opt,name=DH_header,json=DHHeader,proto3" json:"DH_header,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
// Encrypted payload
|
|
|
|
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DirectMessageProtocol) Reset() { *m = DirectMessageProtocol{} }
|
|
|
|
func (m *DirectMessageProtocol) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*DirectMessageProtocol) ProtoMessage() {}
|
|
|
|
func (*DirectMessageProtocol) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8293a649ce9418c6, []int{6}
|
|
|
|
}
|
2018-11-06 08:05:32 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *DirectMessageProtocol) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_DirectMessageProtocol.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *DirectMessageProtocol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_DirectMessageProtocol.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *DirectMessageProtocol) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_DirectMessageProtocol.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *DirectMessageProtocol) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_DirectMessageProtocol.Size(m)
|
|
|
|
}
|
|
|
|
func (m *DirectMessageProtocol) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_DirectMessageProtocol.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_DirectMessageProtocol proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *DirectMessageProtocol) GetX3DHHeader() *X3DHHeader {
|
|
|
|
if m != nil {
|
|
|
|
return m.X3DHHeader
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DirectMessageProtocol) GetDRHeader() *DRHeader {
|
|
|
|
if m != nil {
|
|
|
|
return m.DRHeader
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DirectMessageProtocol) GetDHHeader() *DHHeader {
|
|
|
|
if m != nil {
|
|
|
|
return m.DHHeader
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *DirectMessageProtocol) GetPayload() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.Payload
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// Top-level protocol message
|
|
|
|
type ProtocolMessage struct {
|
|
|
|
// An optional bundle is exchanged with each message
|
|
|
|
Bundle *Bundle `protobuf:"bytes,1,opt,name=bundle,proto3" json:"bundle,omitempty"`
|
2018-10-16 10:31:05 +00:00
|
|
|
// The device id of the sender
|
|
|
|
InstallationId string `protobuf:"bytes,2,opt,name=installation_id,json=installationId,proto3" json:"installation_id,omitempty"`
|
2018-09-24 18:07:34 +00:00
|
|
|
// One to one message, encrypted, indexed by installation_id
|
|
|
|
DirectMessage map[string]*DirectMessageProtocol `protobuf:"bytes,101,rep,name=direct_message,json=directMessage,proto3" json:"direct_message,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
|
|
|
// Public chats, not encrypted
|
|
|
|
PublicMessage []byte `protobuf:"bytes,102,opt,name=public_message,json=publicMessage,proto3" json:"public_message,omitempty"`
|
|
|
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
|
XXX_unrecognized []byte `json:"-"`
|
|
|
|
XXX_sizecache int32 `json:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ProtocolMessage) Reset() { *m = ProtocolMessage{} }
|
|
|
|
func (m *ProtocolMessage) String() string { return proto.CompactTextString(m) }
|
|
|
|
func (*ProtocolMessage) ProtoMessage() {}
|
|
|
|
func (*ProtocolMessage) Descriptor() ([]byte, []int) {
|
|
|
|
return fileDescriptor_8293a649ce9418c6, []int{7}
|
|
|
|
}
|
2018-11-06 08:05:32 +00:00
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *ProtocolMessage) XXX_Unmarshal(b []byte) error {
|
|
|
|
return xxx_messageInfo_ProtocolMessage.Unmarshal(m, b)
|
|
|
|
}
|
|
|
|
func (m *ProtocolMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
|
return xxx_messageInfo_ProtocolMessage.Marshal(b, m, deterministic)
|
|
|
|
}
|
|
|
|
func (m *ProtocolMessage) XXX_Merge(src proto.Message) {
|
|
|
|
xxx_messageInfo_ProtocolMessage.Merge(m, src)
|
|
|
|
}
|
|
|
|
func (m *ProtocolMessage) XXX_Size() int {
|
|
|
|
return xxx_messageInfo_ProtocolMessage.Size(m)
|
|
|
|
}
|
|
|
|
func (m *ProtocolMessage) XXX_DiscardUnknown() {
|
|
|
|
xxx_messageInfo_ProtocolMessage.DiscardUnknown(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
var xxx_messageInfo_ProtocolMessage proto.InternalMessageInfo
|
|
|
|
|
|
|
|
func (m *ProtocolMessage) GetBundle() *Bundle {
|
|
|
|
if m != nil {
|
|
|
|
return m.Bundle
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2018-10-16 10:31:05 +00:00
|
|
|
func (m *ProtocolMessage) GetInstallationId() string {
|
|
|
|
if m != nil {
|
|
|
|
return m.InstallationId
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
2018-09-24 18:07:34 +00:00
|
|
|
func (m *ProtocolMessage) GetDirectMessage() map[string]*DirectMessageProtocol {
|
|
|
|
if m != nil {
|
|
|
|
return m.DirectMessage
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *ProtocolMessage) GetPublicMessage() []byte {
|
|
|
|
if m != nil {
|
|
|
|
return m.PublicMessage
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
proto.RegisterType((*SignedPreKey)(nil), "chat.SignedPreKey")
|
|
|
|
proto.RegisterType((*Bundle)(nil), "chat.Bundle")
|
|
|
|
proto.RegisterMapType((map[string]*SignedPreKey)(nil), "chat.Bundle.SignedPreKeysEntry")
|
|
|
|
proto.RegisterType((*BundleContainer)(nil), "chat.BundleContainer")
|
|
|
|
proto.RegisterType((*DRHeader)(nil), "chat.DRHeader")
|
|
|
|
proto.RegisterType((*DHHeader)(nil), "chat.DHHeader")
|
|
|
|
proto.RegisterType((*X3DHHeader)(nil), "chat.X3DHHeader")
|
|
|
|
proto.RegisterType((*DirectMessageProtocol)(nil), "chat.DirectMessageProtocol")
|
|
|
|
proto.RegisterType((*ProtocolMessage)(nil), "chat.ProtocolMessage")
|
|
|
|
proto.RegisterMapType((map[string]*DirectMessageProtocol)(nil), "chat.ProtocolMessage.DirectMessageEntry")
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() { proto.RegisterFile("encryption.proto", fileDescriptor_8293a649ce9418c6) }
|
|
|
|
|
|
|
|
var fileDescriptor_8293a649ce9418c6 = []byte{
|
2018-11-06 08:05:32 +00:00
|
|
|
// 535 bytes of a gzipped FileDescriptorProto
|
|
|
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x5d, 0x8b, 0xd3, 0x40,
|
|
|
|
0x14, 0x25, 0x69, 0xb7, 0xdb, 0xde, 0xa6, 0x69, 0x19, 0x51, 0x42, 0x5d, 0xb0, 0x84, 0x15, 0x03,
|
|
|
|
0x42, 0x61, 0x5b, 0x1f, 0xc4, 0x47, 0xad, 0x58, 0x57, 0xd4, 0x65, 0xf4, 0xc1, 0x17, 0x09, 0xd3,
|
|
|
|
0xe6, 0xba, 0x3b, 0x98, 0x4e, 0xc2, 0x64, 0x5a, 0xe8, 0x2f, 0xf3, 0xcd, 0xbf, 0xa6, 0x64, 0x26,
|
|
|
|
0x69, 0xa7, 0xdd, 0x5d, 0xd8, 0xb7, 0xde, 0x8f, 0x39, 0xe7, 0xdc, 0x73, 0x7b, 0x03, 0x03, 0x14,
|
|
|
|
0x4b, 0xb9, 0xcd, 0x15, 0xcf, 0xc4, 0x38, 0x97, 0x99, 0xca, 0x48, 0x73, 0x79, 0xc3, 0x54, 0xf8,
|
|
|
|
0x05, 0xbc, 0x6f, 0xfc, 0x5a, 0x60, 0x72, 0x25, 0xf1, 0x13, 0x6e, 0xc9, 0x39, 0xf8, 0x85, 0x8e,
|
|
|
|
0xe3, 0x5c, 0x62, 0xfc, 0x1b, 0xb7, 0x81, 0x33, 0x72, 0x22, 0x8f, 0x7a, 0x85, 0xdd, 0x15, 0xc0,
|
|
|
|
0xe9, 0x06, 0x65, 0xc1, 0x33, 0x11, 0xb8, 0x23, 0x27, 0xea, 0xd1, 0x3a, 0x0c, 0xff, 0x39, 0xd0,
|
|
|
|
0x7a, 0xbb, 0x16, 0x49, 0x8a, 0x64, 0x08, 0x6d, 0x9e, 0xa0, 0x50, 0x5c, 0xd5, 0x20, 0xbb, 0x98,
|
|
|
|
0x7c, 0x80, 0x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