serialize

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2024 License: GPL-3.0 Imports: 14 Imported by: 1

Documentation

Overview

Package serialize provides a serialization structure to serialize and deserialize Signal objects into storeable and transportable bytes.

Index

Constants

This section is empty.

Variables

View Source
var File_serialize_FingerprintProtocol_proto protoreflect.FileDescriptor
View Source
var File_serialize_LocalStorageProtocol_proto protoreflect.FileDescriptor
View Source
var File_serialize_WhisperTextProtocol_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type CombinedFingerprints

type CombinedFingerprints struct {
	Version           *uint32             `protobuf:"varint,1,opt,name=version" json:"version,omitempty"`
	LocalFingerprint  *LogicalFingerprint `protobuf:"bytes,2,opt,name=localFingerprint" json:"localFingerprint,omitempty"`
	RemoteFingerprint *LogicalFingerprint `protobuf:"bytes,3,opt,name=remoteFingerprint" json:"remoteFingerprint,omitempty"`
	// contains filtered or unexported fields
}

func (*CombinedFingerprints) Descriptor deprecated

func (*CombinedFingerprints) Descriptor() ([]byte, []int)

Deprecated: Use CombinedFingerprints.ProtoReflect.Descriptor instead.

func (*CombinedFingerprints) GetLocalFingerprint

func (x *CombinedFingerprints) GetLocalFingerprint() *LogicalFingerprint

func (*CombinedFingerprints) GetRemoteFingerprint

func (x *CombinedFingerprints) GetRemoteFingerprint() *LogicalFingerprint

func (*CombinedFingerprints) GetVersion

func (x *CombinedFingerprints) GetVersion() uint32

func (*CombinedFingerprints) ProtoMessage

func (*CombinedFingerprints) ProtoMessage()

func (*CombinedFingerprints) ProtoReflect

func (x *CombinedFingerprints) ProtoReflect() protoreflect.Message

func (*CombinedFingerprints) Reset

func (x *CombinedFingerprints) Reset()

func (*CombinedFingerprints) String

func (x *CombinedFingerprints) String() string

type DeviceConsistencyCodeMessage

type DeviceConsistencyCodeMessage struct {
	Generation *uint32 `protobuf:"varint,1,opt,name=generation" json:"generation,omitempty"`
	Signature  []byte  `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*DeviceConsistencyCodeMessage) Descriptor deprecated

func (*DeviceConsistencyCodeMessage) Descriptor() ([]byte, []int)

Deprecated: Use DeviceConsistencyCodeMessage.ProtoReflect.Descriptor instead.

func (*DeviceConsistencyCodeMessage) GetGeneration

func (x *DeviceConsistencyCodeMessage) GetGeneration() uint32

func (*DeviceConsistencyCodeMessage) GetSignature

func (x *DeviceConsistencyCodeMessage) GetSignature() []byte

func (*DeviceConsistencyCodeMessage) ProtoMessage

func (*DeviceConsistencyCodeMessage) ProtoMessage()

func (*DeviceConsistencyCodeMessage) ProtoReflect

func (*DeviceConsistencyCodeMessage) Reset

func (x *DeviceConsistencyCodeMessage) Reset()

func (*DeviceConsistencyCodeMessage) String

type IdentityKeyPairStructure

type IdentityKeyPairStructure struct {
	PublicKey  []byte `protobuf:"bytes,1,opt,name=publicKey" json:"publicKey,omitempty"`
	PrivateKey []byte `protobuf:"bytes,2,opt,name=privateKey" json:"privateKey,omitempty"`
	// contains filtered or unexported fields
}

func (*IdentityKeyPairStructure) Descriptor deprecated

func (*IdentityKeyPairStructure) Descriptor() ([]byte, []int)

Deprecated: Use IdentityKeyPairStructure.ProtoReflect.Descriptor instead.

func (*IdentityKeyPairStructure) GetPrivateKey

func (x *IdentityKeyPairStructure) GetPrivateKey() []byte

func (*IdentityKeyPairStructure) GetPublicKey

func (x *IdentityKeyPairStructure) GetPublicKey() []byte

func (*IdentityKeyPairStructure) ProtoMessage

func (*IdentityKeyPairStructure) ProtoMessage()

func (*IdentityKeyPairStructure) ProtoReflect

func (x *IdentityKeyPairStructure) ProtoReflect() protoreflect.Message

func (*IdentityKeyPairStructure) Reset

func (x *IdentityKeyPairStructure) Reset()

func (*IdentityKeyPairStructure) String

func (x *IdentityKeyPairStructure) String() string

type JSONPreKeyRecordSerializer

type JSONPreKeyRecordSerializer struct{}

JSONPreKeyRecordSerializer is a structure for serializing prekey records into and from JSON.

func (*JSONPreKeyRecordSerializer) Deserialize

func (j *JSONPreKeyRecordSerializer) Deserialize(serialized []byte) (*record.PreKeyStructure, error)

Deserialize will take in JSON bytes and return a prekey record structure.

func (*JSONPreKeyRecordSerializer) Serialize

func (j *JSONPreKeyRecordSerializer) Serialize(preKey *record.PreKeyStructure) []byte

Serialize will take a prekey record structure and convert it to JSON bytes.

type JSONPreKeySignalMessageSerializer

type JSONPreKeySignalMessageSerializer struct{}

JSONPreKeySignalMessageSerializer is a structure for serializing prekey signal messages into and from JSON.

func (*JSONPreKeySignalMessageSerializer) Deserialize

Deserialize will take in JSON bytes and return a prekey signal message structure.

func (*JSONPreKeySignalMessageSerializer) Serialize

Serialize will take a prekey signal message structure and convert it to JSON bytes.

type JSONSenderKeyDistributionMessageSerializer

type JSONSenderKeyDistributionMessageSerializer struct{}

JSONSenderKeyDistributionMessageSerializer is a structure for serializing senderkey distribution records to and from JSON.

func (*JSONSenderKeyDistributionMessageSerializer) Deserialize

Deserialize will take in JSON bytes and return a message structure, which can be used to create a new SenderKey Distribution object.

func (*JSONSenderKeyDistributionMessageSerializer) Serialize

Serialize will take a senderkey distribution message and convert it to JSON bytes.

type JSONSenderKeyMessageSerializer

type JSONSenderKeyMessageSerializer struct{}

JSONSenderKeyMessageSerializer is a structure for serializing senderkey messages to and from JSON.

func (*JSONSenderKeyMessageSerializer) Deserialize

Deserialize will take in JSON bytes and return a message structure, which can be used to create a new SenderKey message object.

func (*JSONSenderKeyMessageSerializer) Serialize

Serialize will take a senderkey message and convert it to JSON bytes.

type JSONSenderKeySessionSerializer

type JSONSenderKeySessionSerializer struct{}

JSONSenderKeySessionSerializer is a structure for serializing session records into and from JSON.

func (*JSONSenderKeySessionSerializer) Deserialize

func (j *JSONSenderKeySessionSerializer) Deserialize(serialized []byte) (*groupRecord.SenderKeyStructure, error)

Deserialize will take in JSON bytes and return a session structure, which can be used to create a new Session Record object.

func (*JSONSenderKeySessionSerializer) Serialize

Serialize will take a session structure and convert it to JSON bytes.

type JSONSenderKeyStateSerializer

type JSONSenderKeyStateSerializer struct{}

JSONSenderKeyStateSerializer is a structure for serializing group session states into and from JSON.

func (*JSONSenderKeyStateSerializer) Deserialize

Deserialize will take in JSON bytes and return a session state structure.

func (*JSONSenderKeyStateSerializer) Serialize

Serialize will take a session state structure and convert it to JSON bytes.

type JSONSessionSerializer

type JSONSessionSerializer struct{}

JSONSessionSerializer is a structure for serializing session records into and from JSON.

func (*JSONSessionSerializer) Deserialize

func (j *JSONSessionSerializer) Deserialize(serialized []byte) (*record.SessionStructure, error)

Deserialize will take in JSON bytes and return a session structure, which can be used to create a new Session Record object.

func (*JSONSessionSerializer) Serialize

func (j *JSONSessionSerializer) Serialize(session *record.SessionStructure) []byte

Serialize will take a session structure and convert it to JSON bytes.

type JSONSignalMessageSerializer

type JSONSignalMessageSerializer struct{}

JSONSignalMessageSerializer is a structure for serializing signal messages into and from JSON.

func (*JSONSignalMessageSerializer) Deserialize

func (j *JSONSignalMessageSerializer) Deserialize(serialized []byte) (*protocol.SignalMessageStructure, error)

Deserialize will take in JSON bytes and return a signal message structure.

func (*JSONSignalMessageSerializer) Serialize

func (j *JSONSignalMessageSerializer) Serialize(signalMessage *protocol.SignalMessageStructure) []byte

Serialize will take a signal message structure and convert it to JSON bytes.

type JSONSignedPreKeyRecordSerializer

type JSONSignedPreKeyRecordSerializer struct{}

JSONSignedPreKeyRecordSerializer is a structure for serializing signed prekey records into and from JSON.

func (*JSONSignedPreKeyRecordSerializer) Deserialize

func (j *JSONSignedPreKeyRecordSerializer) Deserialize(serialized []byte) (*record.SignedPreKeyStructure, error)

Deserialize will take in JSON bytes and return a signed prekey record structure.

func (*JSONSignedPreKeyRecordSerializer) Serialize

func (j *JSONSignedPreKeyRecordSerializer) Serialize(signedPreKey *record.SignedPreKeyStructure) []byte

Serialize will take a signed prekey record structure and convert it to JSON bytes.

type JSONStateSerializer

type JSONStateSerializer struct{}

JSONStateSerializer is a structure for serializing session states into and from JSON.

func (*JSONStateSerializer) Deserialize

func (j *JSONStateSerializer) Deserialize(serialized []byte) (*record.StateStructure, error)

Deserialize will take in JSON bytes and return a session state structure.

func (*JSONStateSerializer) Serialize

func (j *JSONStateSerializer) Serialize(state *record.StateStructure) []byte

Serialize will take a session state structure and convert it to JSON bytes.

type KeyExchangeMessage

type KeyExchangeMessage struct {
	Id               *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	BaseKey          []byte  `protobuf:"bytes,2,opt,name=baseKey" json:"baseKey,omitempty"`
	RatchetKey       []byte  `protobuf:"bytes,3,opt,name=ratchetKey" json:"ratchetKey,omitempty"`
	IdentityKey      []byte  `protobuf:"bytes,4,opt,name=identityKey" json:"identityKey,omitempty"`
	BaseKeySignature []byte  `protobuf:"bytes,5,opt,name=baseKeySignature" json:"baseKeySignature,omitempty"`
	// contains filtered or unexported fields
}

func (*KeyExchangeMessage) Descriptor deprecated

func (*KeyExchangeMessage) Descriptor() ([]byte, []int)

Deprecated: Use KeyExchangeMessage.ProtoReflect.Descriptor instead.

func (*KeyExchangeMessage) GetBaseKey

func (x *KeyExchangeMessage) GetBaseKey() []byte

func (*KeyExchangeMessage) GetBaseKeySignature

func (x *KeyExchangeMessage) GetBaseKeySignature() []byte

func (*KeyExchangeMessage) GetId

func (x *KeyExchangeMessage) GetId() uint32

func (*KeyExchangeMessage) GetIdentityKey

func (x *KeyExchangeMessage) GetIdentityKey() []byte

func (*KeyExchangeMessage) GetRatchetKey

func (x *KeyExchangeMessage) GetRatchetKey() []byte

func (*KeyExchangeMessage) ProtoMessage

func (*KeyExchangeMessage) ProtoMessage()

func (*KeyExchangeMessage) ProtoReflect

func (x *KeyExchangeMessage) ProtoReflect() protoreflect.Message

func (*KeyExchangeMessage) Reset

func (x *KeyExchangeMessage) Reset()

func (*KeyExchangeMessage) String

func (x *KeyExchangeMessage) String() string

type LogicalFingerprint

type LogicalFingerprint struct {
	Content    []byte `protobuf:"bytes,1,opt,name=content" json:"content,omitempty"`
	Identifier []byte `protobuf:"bytes,2,opt,name=identifier" json:"identifier,omitempty"` // Version 0
	// contains filtered or unexported fields
}

func (*LogicalFingerprint) Descriptor deprecated

func (*LogicalFingerprint) Descriptor() ([]byte, []int)

Deprecated: Use LogicalFingerprint.ProtoReflect.Descriptor instead.

func (*LogicalFingerprint) GetContent

func (x *LogicalFingerprint) GetContent() []byte

func (*LogicalFingerprint) GetIdentifier

func (x *LogicalFingerprint) GetIdentifier() []byte

func (*LogicalFingerprint) ProtoMessage

func (*LogicalFingerprint) ProtoMessage()

func (*LogicalFingerprint) ProtoReflect

func (x *LogicalFingerprint) ProtoReflect() protoreflect.Message

func (*LogicalFingerprint) Reset

func (x *LogicalFingerprint) Reset()

func (*LogicalFingerprint) String

func (x *LogicalFingerprint) String() string

type PreKeyRecordStructure

type PreKeyRecordStructure struct {
	Id         *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	PublicKey  []byte  `protobuf:"bytes,2,opt,name=publicKey" json:"publicKey,omitempty"`
	PrivateKey []byte  `protobuf:"bytes,3,opt,name=privateKey" json:"privateKey,omitempty"`
	// contains filtered or unexported fields
}

func (*PreKeyRecordStructure) Descriptor deprecated

func (*PreKeyRecordStructure) Descriptor() ([]byte, []int)

Deprecated: Use PreKeyRecordStructure.ProtoReflect.Descriptor instead.

func (*PreKeyRecordStructure) GetId

func (x *PreKeyRecordStructure) GetId() uint32

func (*PreKeyRecordStructure) GetPrivateKey

func (x *PreKeyRecordStructure) GetPrivateKey() []byte

func (*PreKeyRecordStructure) GetPublicKey

func (x *PreKeyRecordStructure) GetPublicKey() []byte

func (*PreKeyRecordStructure) ProtoMessage

func (*PreKeyRecordStructure) ProtoMessage()

func (*PreKeyRecordStructure) ProtoReflect

func (x *PreKeyRecordStructure) ProtoReflect() protoreflect.Message

func (*PreKeyRecordStructure) Reset

func (x *PreKeyRecordStructure) Reset()

func (*PreKeyRecordStructure) String

func (x *PreKeyRecordStructure) String() string

type PreKeySignalMessage

type PreKeySignalMessage struct {
	RegistrationId *uint32 `protobuf:"varint,5,opt,name=registrationId" json:"registrationId,omitempty"`
	PreKeyId       *uint32 `protobuf:"varint,1,opt,name=preKeyId" json:"preKeyId,omitempty"`
	SignedPreKeyId *uint32 `protobuf:"varint,6,opt,name=signedPreKeyId" json:"signedPreKeyId,omitempty"`
	BaseKey        []byte  `protobuf:"bytes,2,opt,name=baseKey" json:"baseKey,omitempty"`
	IdentityKey    []byte  `protobuf:"bytes,3,opt,name=identityKey" json:"identityKey,omitempty"`
	Message        []byte  `protobuf:"bytes,4,opt,name=message" json:"message,omitempty"` // SignalMessage
	// contains filtered or unexported fields
}

func (*PreKeySignalMessage) Descriptor deprecated

func (*PreKeySignalMessage) Descriptor() ([]byte, []int)

Deprecated: Use PreKeySignalMessage.ProtoReflect.Descriptor instead.

func (*PreKeySignalMessage) GetBaseKey

func (x *PreKeySignalMessage) GetBaseKey() []byte

func (*PreKeySignalMessage) GetIdentityKey

func (x *PreKeySignalMessage) GetIdentityKey() []byte

func (*PreKeySignalMessage) GetMessage

func (x *PreKeySignalMessage) GetMessage() []byte

func (*PreKeySignalMessage) GetPreKeyId

func (x *PreKeySignalMessage) GetPreKeyId() uint32

func (*PreKeySignalMessage) GetRegistrationId

func (x *PreKeySignalMessage) GetRegistrationId() uint32

func (*PreKeySignalMessage) GetSignedPreKeyId

func (x *PreKeySignalMessage) GetSignedPreKeyId() uint32

func (*PreKeySignalMessage) ProtoMessage

func (*PreKeySignalMessage) ProtoMessage()

func (*PreKeySignalMessage) ProtoReflect

func (x *PreKeySignalMessage) ProtoReflect() protoreflect.Message

func (*PreKeySignalMessage) Reset

func (x *PreKeySignalMessage) Reset()

func (*PreKeySignalMessage) String

func (x *PreKeySignalMessage) String() string

type ProtoBufPreKeySignalMessageSerializer

type ProtoBufPreKeySignalMessageSerializer struct{}

ProtoBufPreKeySignalMessageSerializer is a structure for serializing prekey signal messages into and from ProtoBuf.

func (*ProtoBufPreKeySignalMessageSerializer) Deserialize

Deserialize will take in ProtoBuf bytes and return a prekey signal message structure.

func (*ProtoBufPreKeySignalMessageSerializer) Serialize

Serialize will take a prekey signal message structure and convert it to ProtoBuf bytes.

type ProtoBufSenderKeyDistributionMessageSerializer

type ProtoBufSenderKeyDistributionMessageSerializer struct{}

ProtoBufSenderKeyDistributionMessageSerializer is a structure for serializing senderkey distribution records to and from ProtoBuf.

func (*ProtoBufSenderKeyDistributionMessageSerializer) Deserialize

Deserialize will take in ProtoBuf bytes and return a message structure, which can be used to create a new SenderKey Distribution object.

func (*ProtoBufSenderKeyDistributionMessageSerializer) Serialize

Serialize will take a senderkey distribution message and convert it to ProtoBuf bytes.

type ProtoBufSenderKeyMessageSerializer

type ProtoBufSenderKeyMessageSerializer struct{}

ProtoBufSenderKeyMessageSerializer is a structure for serializing senderkey messages to and from ProtoBuf.

func (*ProtoBufSenderKeyMessageSerializer) Deserialize

Deserialize will take in ProtoBuf bytes and return a message structure, which can be used to create a new SenderKey message object.

func (*ProtoBufSenderKeyMessageSerializer) Serialize

Serialize will take a senderkey message and convert it to ProtoBuf bytes.

type ProtoBufSignalMessageSerializer

type ProtoBufSignalMessageSerializer struct{}

ProtoBufSignalMessageSerializer is a structure for serializing signal messages into and from ProtoBuf.

func (*ProtoBufSignalMessageSerializer) Deserialize

Deserialize will take in ProtoBuf bytes and return a signal message structure.

func (*ProtoBufSignalMessageSerializer) Serialize

Serialize will take a signal message structure and convert it to ProtoBuf bytes.

type RecordStructure

type RecordStructure struct {
	CurrentSession   *SessionStructure   `protobuf:"bytes,1,opt,name=currentSession" json:"currentSession,omitempty"`
	PreviousSessions []*SessionStructure `protobuf:"bytes,2,rep,name=previousSessions" json:"previousSessions,omitempty"`
	// contains filtered or unexported fields
}

func (*RecordStructure) Descriptor deprecated

func (*RecordStructure) Descriptor() ([]byte, []int)

Deprecated: Use RecordStructure.ProtoReflect.Descriptor instead.

func (*RecordStructure) GetCurrentSession

func (x *RecordStructure) GetCurrentSession() *SessionStructure

func (*RecordStructure) GetPreviousSessions

func (x *RecordStructure) GetPreviousSessions() []*SessionStructure

func (*RecordStructure) ProtoMessage

func (*RecordStructure) ProtoMessage()

func (*RecordStructure) ProtoReflect

func (x *RecordStructure) ProtoReflect() protoreflect.Message

func (*RecordStructure) Reset

func (x *RecordStructure) Reset()

func (*RecordStructure) String

func (x *RecordStructure) String() string

type SenderKeyDistributionMessage

type SenderKeyDistributionMessage struct {
	Id         *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Iteration  *uint32 `protobuf:"varint,2,opt,name=iteration" json:"iteration,omitempty"`
	ChainKey   []byte  `protobuf:"bytes,3,opt,name=chainKey" json:"chainKey,omitempty"`
	SigningKey []byte  `protobuf:"bytes,4,opt,name=signingKey" json:"signingKey,omitempty"`
	// contains filtered or unexported fields
}

func (*SenderKeyDistributionMessage) Descriptor deprecated

func (*SenderKeyDistributionMessage) Descriptor() ([]byte, []int)

Deprecated: Use SenderKeyDistributionMessage.ProtoReflect.Descriptor instead.

func (*SenderKeyDistributionMessage) GetChainKey

func (x *SenderKeyDistributionMessage) GetChainKey() []byte

func (*SenderKeyDistributionMessage) GetId

func (*SenderKeyDistributionMessage) GetIteration

func (x *SenderKeyDistributionMessage) GetIteration() uint32

func (*SenderKeyDistributionMessage) GetSigningKey

func (x *SenderKeyDistributionMessage) GetSigningKey() []byte

func (*SenderKeyDistributionMessage) ProtoMessage

func (*SenderKeyDistributionMessage) ProtoMessage()

func (*SenderKeyDistributionMessage) ProtoReflect

func (*SenderKeyDistributionMessage) Reset

func (x *SenderKeyDistributionMessage) Reset()

func (*SenderKeyDistributionMessage) String

type SenderKeyMessage

type SenderKeyMessage struct {
	Id         *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	Iteration  *uint32 `protobuf:"varint,2,opt,name=iteration" json:"iteration,omitempty"`
	Ciphertext []byte  `protobuf:"bytes,3,opt,name=ciphertext" json:"ciphertext,omitempty"`
	// contains filtered or unexported fields
}

func (*SenderKeyMessage) Descriptor deprecated

func (*SenderKeyMessage) Descriptor() ([]byte, []int)

Deprecated: Use SenderKeyMessage.ProtoReflect.Descriptor instead.

func (*SenderKeyMessage) GetCiphertext

func (x *SenderKeyMessage) GetCiphertext() []byte

func (*SenderKeyMessage) GetId

func (x *SenderKeyMessage) GetId() uint32

func (*SenderKeyMessage) GetIteration

func (x *SenderKeyMessage) GetIteration() uint32

func (*SenderKeyMessage) ProtoMessage

func (*SenderKeyMessage) ProtoMessage()

func (*SenderKeyMessage) ProtoReflect

func (x *SenderKeyMessage) ProtoReflect() protoreflect.Message

func (*SenderKeyMessage) Reset

func (x *SenderKeyMessage) Reset()

func (*SenderKeyMessage) String

func (x *SenderKeyMessage) String() string

type SenderKeyRecordStructure

type SenderKeyRecordStructure struct {
	SenderKeyStates []*SenderKeyStateStructure `protobuf:"bytes,1,rep,name=senderKeyStates" json:"senderKeyStates,omitempty"`
	// contains filtered or unexported fields
}

func (*SenderKeyRecordStructure) Descriptor deprecated

func (*SenderKeyRecordStructure) Descriptor() ([]byte, []int)

Deprecated: Use SenderKeyRecordStructure.ProtoReflect.Descriptor instead.

func (*SenderKeyRecordStructure) GetSenderKeyStates

func (x *SenderKeyRecordStructure) GetSenderKeyStates() []*SenderKeyStateStructure

func (*SenderKeyRecordStructure) ProtoMessage

func (*SenderKeyRecordStructure) ProtoMessage()

func (*SenderKeyRecordStructure) ProtoReflect

func (x *SenderKeyRecordStructure) ProtoReflect() protoreflect.Message

func (*SenderKeyRecordStructure) Reset

func (x *SenderKeyRecordStructure) Reset()

func (*SenderKeyRecordStructure) String

func (x *SenderKeyRecordStructure) String() string

type SenderKeyStateStructure

type SenderKeyStateStructure struct {
	SenderKeyId       *uint32                                     `protobuf:"varint,1,opt,name=senderKeyId" json:"senderKeyId,omitempty"`
	SenderChainKey    *SenderKeyStateStructure_SenderChainKey     `protobuf:"bytes,2,opt,name=senderChainKey" json:"senderChainKey,omitempty"`
	SenderSigningKey  *SenderKeyStateStructure_SenderSigningKey   `protobuf:"bytes,3,opt,name=senderSigningKey" json:"senderSigningKey,omitempty"`
	SenderMessageKeys []*SenderKeyStateStructure_SenderMessageKey `protobuf:"bytes,4,rep,name=senderMessageKeys" json:"senderMessageKeys,omitempty"`
	// contains filtered or unexported fields
}

func (*SenderKeyStateStructure) Descriptor deprecated

func (*SenderKeyStateStructure) Descriptor() ([]byte, []int)

Deprecated: Use SenderKeyStateStructure.ProtoReflect.Descriptor instead.

func (*SenderKeyStateStructure) GetSenderChainKey

func (*SenderKeyStateStructure) GetSenderKeyId

func (x *SenderKeyStateStructure) GetSenderKeyId() uint32

func (*SenderKeyStateStructure) GetSenderMessageKeys

func (*SenderKeyStateStructure) GetSenderSigningKey

func (*SenderKeyStateStructure) ProtoMessage

func (*SenderKeyStateStructure) ProtoMessage()

func (*SenderKeyStateStructure) ProtoReflect

func (x *SenderKeyStateStructure) ProtoReflect() protoreflect.Message

func (*SenderKeyStateStructure) Reset

func (x *SenderKeyStateStructure) Reset()

func (*SenderKeyStateStructure) String

func (x *SenderKeyStateStructure) String() string

type SenderKeyStateStructure_SenderChainKey

type SenderKeyStateStructure_SenderChainKey struct {
	Iteration *uint32 `protobuf:"varint,1,opt,name=iteration" json:"iteration,omitempty"`
	Seed      []byte  `protobuf:"bytes,2,opt,name=seed" json:"seed,omitempty"`
	// contains filtered or unexported fields
}

func (*SenderKeyStateStructure_SenderChainKey) Descriptor deprecated

func (*SenderKeyStateStructure_SenderChainKey) Descriptor() ([]byte, []int)

Deprecated: Use SenderKeyStateStructure_SenderChainKey.ProtoReflect.Descriptor instead.

func (*SenderKeyStateStructure_SenderChainKey) GetIteration

func (*SenderKeyStateStructure_SenderChainKey) GetSeed

func (*SenderKeyStateStructure_SenderChainKey) ProtoMessage

func (*SenderKeyStateStructure_SenderChainKey) ProtoReflect

func (*SenderKeyStateStructure_SenderChainKey) Reset

func (*SenderKeyStateStructure_SenderChainKey) String

type SenderKeyStateStructure_SenderMessageKey

type SenderKeyStateStructure_SenderMessageKey struct {
	Iteration *uint32 `protobuf:"varint,1,opt,name=iteration" json:"iteration,omitempty"`
	Seed      []byte  `protobuf:"bytes,2,opt,name=seed" json:"seed,omitempty"`
	// contains filtered or unexported fields
}

func (*SenderKeyStateStructure_SenderMessageKey) Descriptor deprecated

func (*SenderKeyStateStructure_SenderMessageKey) Descriptor() ([]byte, []int)

Deprecated: Use SenderKeyStateStructure_SenderMessageKey.ProtoReflect.Descriptor instead.

func (*SenderKeyStateStructure_SenderMessageKey) GetIteration

func (*SenderKeyStateStructure_SenderMessageKey) GetSeed

func (*SenderKeyStateStructure_SenderMessageKey) ProtoMessage

func (*SenderKeyStateStructure_SenderMessageKey) ProtoReflect

func (*SenderKeyStateStructure_SenderMessageKey) Reset

func (*SenderKeyStateStructure_SenderMessageKey) String

type SenderKeyStateStructure_SenderSigningKey

type SenderKeyStateStructure_SenderSigningKey struct {
	Public  []byte `protobuf:"bytes,1,opt,name=public" json:"public,omitempty"`
	Private []byte `protobuf:"bytes,2,opt,name=private" json:"private,omitempty"`
	// contains filtered or unexported fields
}

func (*SenderKeyStateStructure_SenderSigningKey) Descriptor deprecated

func (*SenderKeyStateStructure_SenderSigningKey) Descriptor() ([]byte, []int)

Deprecated: Use SenderKeyStateStructure_SenderSigningKey.ProtoReflect.Descriptor instead.

func (*SenderKeyStateStructure_SenderSigningKey) GetPrivate

func (*SenderKeyStateStructure_SenderSigningKey) GetPublic

func (*SenderKeyStateStructure_SenderSigningKey) ProtoMessage

func (*SenderKeyStateStructure_SenderSigningKey) ProtoReflect

func (*SenderKeyStateStructure_SenderSigningKey) Reset

func (*SenderKeyStateStructure_SenderSigningKey) String

type Serializer

type Serializer struct {
	SenderKeyRecord              groupRecord.SenderKeySerializer
	SenderKeyState               groupRecord.SenderKeyStateSerializer
	SignalMessage                protocol.SignalMessageSerializer
	PreKeySignalMessage          protocol.PreKeySignalMessageSerializer
	SenderKeyMessage             protocol.SenderKeyMessageSerializer
	SenderKeyDistributionMessage protocol.SenderKeyDistributionMessageSerializer
	SignedPreKeyRecord           record.SignedPreKeySerializer
	PreKeyRecord                 record.PreKeySerializer
	State                        record.StateSerializer
	Session                      record.SessionSerializer
}

Serializer is a structure to serialize Signal objects into bytes. This allows you to use any serialization format to store or send Signal objects.

func NewJSONSerializer

func NewJSONSerializer() *Serializer

NewJSONSerializer will return a serializer for all Signal objects that will be responsible for converting objects to and from JSON bytes.

func NewProtoBufSerializer

func NewProtoBufSerializer() *Serializer

NewProtoBufSerializer will return a serializer for all Signal objects that will be responsible for converting objects to and from ProtoBuf bytes.

func NewSerializer

func NewSerializer() *Serializer

NewSerializer will return a new serializer object that will be used to encode/decode Signal objects into bytes.

type SessionStructure

type SessionStructure struct {
	SessionVersion       *uint32                              `protobuf:"varint,1,opt,name=sessionVersion" json:"sessionVersion,omitempty"`
	LocalIdentityPublic  []byte                               `protobuf:"bytes,2,opt,name=localIdentityPublic" json:"localIdentityPublic,omitempty"`
	RemoteIdentityPublic []byte                               `protobuf:"bytes,3,opt,name=remoteIdentityPublic" json:"remoteIdentityPublic,omitempty"`
	RootKey              []byte                               `protobuf:"bytes,4,opt,name=rootKey" json:"rootKey,omitempty"`
	PreviousCounter      *uint32                              `protobuf:"varint,5,opt,name=previousCounter" json:"previousCounter,omitempty"`
	SenderChain          *SessionStructure_Chain              `protobuf:"bytes,6,opt,name=senderChain" json:"senderChain,omitempty"`
	ReceiverChains       []*SessionStructure_Chain            `protobuf:"bytes,7,rep,name=receiverChains" json:"receiverChains,omitempty"`
	PendingKeyExchange   *SessionStructure_PendingKeyExchange `protobuf:"bytes,8,opt,name=pendingKeyExchange" json:"pendingKeyExchange,omitempty"`
	PendingPreKey        *SessionStructure_PendingPreKey      `protobuf:"bytes,9,opt,name=pendingPreKey" json:"pendingPreKey,omitempty"`
	RemoteRegistrationId *uint32                              `protobuf:"varint,10,opt,name=remoteRegistrationId" json:"remoteRegistrationId,omitempty"`
	LocalRegistrationId  *uint32                              `protobuf:"varint,11,opt,name=localRegistrationId" json:"localRegistrationId,omitempty"`
	NeedsRefresh         *bool                                `protobuf:"varint,12,opt,name=needsRefresh" json:"needsRefresh,omitempty"`
	AliceBaseKey         []byte                               `protobuf:"bytes,13,opt,name=aliceBaseKey" json:"aliceBaseKey,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionStructure) Descriptor deprecated

func (*SessionStructure) Descriptor() ([]byte, []int)

Deprecated: Use SessionStructure.ProtoReflect.Descriptor instead.

func (*SessionStructure) GetAliceBaseKey

func (x *SessionStructure) GetAliceBaseKey() []byte

func (*SessionStructure) GetLocalIdentityPublic

func (x *SessionStructure) GetLocalIdentityPublic() []byte

func (*SessionStructure) GetLocalRegistrationId

func (x *SessionStructure) GetLocalRegistrationId() uint32

func (*SessionStructure) GetNeedsRefresh

func (x *SessionStructure) GetNeedsRefresh() bool

func (*SessionStructure) GetPendingKeyExchange

func (x *SessionStructure) GetPendingKeyExchange() *SessionStructure_PendingKeyExchange

func (*SessionStructure) GetPendingPreKey

func (x *SessionStructure) GetPendingPreKey() *SessionStructure_PendingPreKey

func (*SessionStructure) GetPreviousCounter

func (x *SessionStructure) GetPreviousCounter() uint32

func (*SessionStructure) GetReceiverChains

func (x *SessionStructure) GetReceiverChains() []*SessionStructure_Chain

func (*SessionStructure) GetRemoteIdentityPublic

func (x *SessionStructure) GetRemoteIdentityPublic() []byte

func (*SessionStructure) GetRemoteRegistrationId

func (x *SessionStructure) GetRemoteRegistrationId() uint32

func (*SessionStructure) GetRootKey

func (x *SessionStructure) GetRootKey() []byte

func (*SessionStructure) GetSenderChain

func (x *SessionStructure) GetSenderChain() *SessionStructure_Chain

func (*SessionStructure) GetSessionVersion

func (x *SessionStructure) GetSessionVersion() uint32

func (*SessionStructure) ProtoMessage

func (*SessionStructure) ProtoMessage()

func (*SessionStructure) ProtoReflect

func (x *SessionStructure) ProtoReflect() protoreflect.Message

func (*SessionStructure) Reset

func (x *SessionStructure) Reset()

func (*SessionStructure) String

func (x *SessionStructure) String() string

type SessionStructure_Chain

type SessionStructure_Chain struct {
	SenderRatchetKey        []byte                               `protobuf:"bytes,1,opt,name=senderRatchetKey" json:"senderRatchetKey,omitempty"`
	SenderRatchetKeyPrivate []byte                               `protobuf:"bytes,2,opt,name=senderRatchetKeyPrivate" json:"senderRatchetKeyPrivate,omitempty"`
	ChainKey                *SessionStructure_Chain_ChainKey     `protobuf:"bytes,3,opt,name=chainKey" json:"chainKey,omitempty"`
	MessageKeys             []*SessionStructure_Chain_MessageKey `protobuf:"bytes,4,rep,name=messageKeys" json:"messageKeys,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionStructure_Chain) Descriptor deprecated

func (*SessionStructure_Chain) Descriptor() ([]byte, []int)

Deprecated: Use SessionStructure_Chain.ProtoReflect.Descriptor instead.

func (*SessionStructure_Chain) GetChainKey

func (*SessionStructure_Chain) GetMessageKeys

func (*SessionStructure_Chain) GetSenderRatchetKey

func (x *SessionStructure_Chain) GetSenderRatchetKey() []byte

func (*SessionStructure_Chain) GetSenderRatchetKeyPrivate

func (x *SessionStructure_Chain) GetSenderRatchetKeyPrivate() []byte

func (*SessionStructure_Chain) ProtoMessage

func (*SessionStructure_Chain) ProtoMessage()

func (*SessionStructure_Chain) ProtoReflect

func (x *SessionStructure_Chain) ProtoReflect() protoreflect.Message

func (*SessionStructure_Chain) Reset

func (x *SessionStructure_Chain) Reset()

func (*SessionStructure_Chain) String

func (x *SessionStructure_Chain) String() string

type SessionStructure_Chain_ChainKey

type SessionStructure_Chain_ChainKey struct {
	Index *uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
	Key   []byte  `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionStructure_Chain_ChainKey) Descriptor deprecated

func (*SessionStructure_Chain_ChainKey) Descriptor() ([]byte, []int)

Deprecated: Use SessionStructure_Chain_ChainKey.ProtoReflect.Descriptor instead.

func (*SessionStructure_Chain_ChainKey) GetIndex

func (*SessionStructure_Chain_ChainKey) GetKey

func (x *SessionStructure_Chain_ChainKey) GetKey() []byte

func (*SessionStructure_Chain_ChainKey) ProtoMessage

func (*SessionStructure_Chain_ChainKey) ProtoMessage()

func (*SessionStructure_Chain_ChainKey) ProtoReflect

func (*SessionStructure_Chain_ChainKey) Reset

func (*SessionStructure_Chain_ChainKey) String

type SessionStructure_Chain_MessageKey

type SessionStructure_Chain_MessageKey struct {
	Index     *uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
	CipherKey []byte  `protobuf:"bytes,2,opt,name=cipherKey" json:"cipherKey,omitempty"`
	MacKey    []byte  `protobuf:"bytes,3,opt,name=macKey" json:"macKey,omitempty"`
	Iv        []byte  `protobuf:"bytes,4,opt,name=iv" json:"iv,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionStructure_Chain_MessageKey) Descriptor deprecated

func (*SessionStructure_Chain_MessageKey) Descriptor() ([]byte, []int)

Deprecated: Use SessionStructure_Chain_MessageKey.ProtoReflect.Descriptor instead.

func (*SessionStructure_Chain_MessageKey) GetCipherKey

func (x *SessionStructure_Chain_MessageKey) GetCipherKey() []byte

func (*SessionStructure_Chain_MessageKey) GetIndex

func (*SessionStructure_Chain_MessageKey) GetIv

func (*SessionStructure_Chain_MessageKey) GetMacKey

func (x *SessionStructure_Chain_MessageKey) GetMacKey() []byte

func (*SessionStructure_Chain_MessageKey) ProtoMessage

func (*SessionStructure_Chain_MessageKey) ProtoMessage()

func (*SessionStructure_Chain_MessageKey) ProtoReflect

func (*SessionStructure_Chain_MessageKey) Reset

func (*SessionStructure_Chain_MessageKey) String

type SessionStructure_PendingKeyExchange

type SessionStructure_PendingKeyExchange struct {
	Sequence                *uint32 `protobuf:"varint,1,opt,name=sequence" json:"sequence,omitempty"`
	LocalBaseKey            []byte  `protobuf:"bytes,2,opt,name=localBaseKey" json:"localBaseKey,omitempty"`
	LocalBaseKeyPrivate     []byte  `protobuf:"bytes,3,opt,name=localBaseKeyPrivate" json:"localBaseKeyPrivate,omitempty"`
	LocalRatchetKey         []byte  `protobuf:"bytes,4,opt,name=localRatchetKey" json:"localRatchetKey,omitempty"`
	LocalRatchetKeyPrivate  []byte  `protobuf:"bytes,5,opt,name=localRatchetKeyPrivate" json:"localRatchetKeyPrivate,omitempty"`
	LocalIdentityKey        []byte  `protobuf:"bytes,7,opt,name=localIdentityKey" json:"localIdentityKey,omitempty"`
	LocalIdentityKeyPrivate []byte  `protobuf:"bytes,8,opt,name=localIdentityKeyPrivate" json:"localIdentityKeyPrivate,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionStructure_PendingKeyExchange) Descriptor deprecated

func (*SessionStructure_PendingKeyExchange) Descriptor() ([]byte, []int)

Deprecated: Use SessionStructure_PendingKeyExchange.ProtoReflect.Descriptor instead.

func (*SessionStructure_PendingKeyExchange) GetLocalBaseKey

func (x *SessionStructure_PendingKeyExchange) GetLocalBaseKey() []byte

func (*SessionStructure_PendingKeyExchange) GetLocalBaseKeyPrivate

func (x *SessionStructure_PendingKeyExchange) GetLocalBaseKeyPrivate() []byte

func (*SessionStructure_PendingKeyExchange) GetLocalIdentityKey

func (x *SessionStructure_PendingKeyExchange) GetLocalIdentityKey() []byte

func (*SessionStructure_PendingKeyExchange) GetLocalIdentityKeyPrivate

func (x *SessionStructure_PendingKeyExchange) GetLocalIdentityKeyPrivate() []byte

func (*SessionStructure_PendingKeyExchange) GetLocalRatchetKey

func (x *SessionStructure_PendingKeyExchange) GetLocalRatchetKey() []byte

func (*SessionStructure_PendingKeyExchange) GetLocalRatchetKeyPrivate

func (x *SessionStructure_PendingKeyExchange) GetLocalRatchetKeyPrivate() []byte

func (*SessionStructure_PendingKeyExchange) GetSequence

func (*SessionStructure_PendingKeyExchange) ProtoMessage

func (*SessionStructure_PendingKeyExchange) ProtoMessage()

func (*SessionStructure_PendingKeyExchange) ProtoReflect

func (*SessionStructure_PendingKeyExchange) Reset

func (*SessionStructure_PendingKeyExchange) String

type SessionStructure_PendingPreKey

type SessionStructure_PendingPreKey struct {
	PreKeyId       *uint32 `protobuf:"varint,1,opt,name=preKeyId" json:"preKeyId,omitempty"`
	SignedPreKeyId *int32  `protobuf:"varint,3,opt,name=signedPreKeyId" json:"signedPreKeyId,omitempty"`
	BaseKey        []byte  `protobuf:"bytes,2,opt,name=baseKey" json:"baseKey,omitempty"`
	// contains filtered or unexported fields
}

func (*SessionStructure_PendingPreKey) Descriptor deprecated

func (*SessionStructure_PendingPreKey) Descriptor() ([]byte, []int)

Deprecated: Use SessionStructure_PendingPreKey.ProtoReflect.Descriptor instead.

func (*SessionStructure_PendingPreKey) GetBaseKey

func (x *SessionStructure_PendingPreKey) GetBaseKey() []byte

func (*SessionStructure_PendingPreKey) GetPreKeyId

func (x *SessionStructure_PendingPreKey) GetPreKeyId() uint32

func (*SessionStructure_PendingPreKey) GetSignedPreKeyId

func (x *SessionStructure_PendingPreKey) GetSignedPreKeyId() int32

func (*SessionStructure_PendingPreKey) ProtoMessage

func (*SessionStructure_PendingPreKey) ProtoMessage()

func (*SessionStructure_PendingPreKey) ProtoReflect

func (*SessionStructure_PendingPreKey) Reset

func (x *SessionStructure_PendingPreKey) Reset()

func (*SessionStructure_PendingPreKey) String

type SignalMessage

type SignalMessage struct {
	RatchetKey      []byte  `protobuf:"bytes,1,opt,name=ratchetKey" json:"ratchetKey,omitempty"`
	Counter         *uint32 `protobuf:"varint,2,opt,name=counter" json:"counter,omitempty"`
	PreviousCounter *uint32 `protobuf:"varint,3,opt,name=previousCounter" json:"previousCounter,omitempty"`
	Ciphertext      []byte  `protobuf:"bytes,4,opt,name=ciphertext" json:"ciphertext,omitempty"`
	// contains filtered or unexported fields
}

func (*SignalMessage) Descriptor deprecated

func (*SignalMessage) Descriptor() ([]byte, []int)

Deprecated: Use SignalMessage.ProtoReflect.Descriptor instead.

func (*SignalMessage) GetCiphertext

func (x *SignalMessage) GetCiphertext() []byte

func (*SignalMessage) GetCounter

func (x *SignalMessage) GetCounter() uint32

func (*SignalMessage) GetPreviousCounter

func (x *SignalMessage) GetPreviousCounter() uint32

func (*SignalMessage) GetRatchetKey

func (x *SignalMessage) GetRatchetKey() []byte

func (*SignalMessage) ProtoMessage

func (*SignalMessage) ProtoMessage()

func (*SignalMessage) ProtoReflect

func (x *SignalMessage) ProtoReflect() protoreflect.Message

func (*SignalMessage) Reset

func (x *SignalMessage) Reset()

func (*SignalMessage) String

func (x *SignalMessage) String() string

type SignedPreKeyRecordStructure

type SignedPreKeyRecordStructure struct {
	Id         *uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	PublicKey  []byte  `protobuf:"bytes,2,opt,name=publicKey" json:"publicKey,omitempty"`
	PrivateKey []byte  `protobuf:"bytes,3,opt,name=privateKey" json:"privateKey,omitempty"`
	Signature  []byte  `protobuf:"bytes,4,opt,name=signature" json:"signature,omitempty"`
	Timestamp  *uint64 `protobuf:"fixed64,5,opt,name=timestamp" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*SignedPreKeyRecordStructure) Descriptor deprecated

func (*SignedPreKeyRecordStructure) Descriptor() ([]byte, []int)

Deprecated: Use SignedPreKeyRecordStructure.ProtoReflect.Descriptor instead.

func (*SignedPreKeyRecordStructure) GetId

func (*SignedPreKeyRecordStructure) GetPrivateKey

func (x *SignedPreKeyRecordStructure) GetPrivateKey() []byte

func (*SignedPreKeyRecordStructure) GetPublicKey

func (x *SignedPreKeyRecordStructure) GetPublicKey() []byte

func (*SignedPreKeyRecordStructure) GetSignature

func (x *SignedPreKeyRecordStructure) GetSignature() []byte

func (*SignedPreKeyRecordStructure) GetTimestamp

func (x *SignedPreKeyRecordStructure) GetTimestamp() uint64

func (*SignedPreKeyRecordStructure) ProtoMessage

func (*SignedPreKeyRecordStructure) ProtoMessage()

func (*SignedPreKeyRecordStructure) ProtoReflect

func (*SignedPreKeyRecordStructure) Reset

func (x *SignedPreKeyRecordStructure) Reset()

func (*SignedPreKeyRecordStructure) String

func (x *SignedPreKeyRecordStructure) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL