libsignalgo.mau.fi/libsignal/keys/prekey Index | Files

package prekey

import "go.mau.fi/libsignal/keys/prekey"

Package prekey provides prekey bundle structures for calculating a new Signal session with a user asyncronously.

Index

Types

type Bundle

type Bundle struct {
	// contains filtered or unexported fields
}

Bundle is a structure that contains a remote PreKey and collection of associated items.

func NewBundle

func NewBundle(registrationID, deviceID uint32, preKeyID *optional.Uint32, signedPreKeyID uint32,
	preKeyPublic, signedPreKeyPublic ecc.ECPublicKeyable, signedPreKeySig [64]byte,
	identityKey *identity.Key) *Bundle

NewBundle returns a Bundle structure that contains a remote PreKey and collection of associated items.

func (*Bundle) DeviceID

func (b *Bundle) DeviceID() uint32

DeviceID returns the device ID this PreKey belongs to.

func (*Bundle) IdentityKey

func (b *Bundle) IdentityKey() *identity.Key

IdentityKey returns the Identity Key of this PreKey's owner.

func (*Bundle) PreKey

func (b *Bundle) PreKey() ecc.ECPublicKeyable

PreKey returns the public key for this PreKey.

func (*Bundle) PreKeyID

func (b *Bundle) PreKeyID() *optional.Uint32

PreKeyID returns the unique key ID for this PreKey.

func (*Bundle) RegistrationID

func (b *Bundle) RegistrationID() uint32

RegistrationID returns the registration ID associated with this PreKey.

func (*Bundle) SignedPreKey

func (b *Bundle) SignedPreKey() ecc.ECPublicKeyable

SignedPreKey returns the signed PreKey for this PreKeyBundle.

func (*Bundle) SignedPreKeyID

func (b *Bundle) SignedPreKeyID() uint32

SignedPreKeyID returns the unique key ID for this signed PreKey.

func (*Bundle) SignedPreKeySignature

func (b *Bundle) SignedPreKeySignature() [64]byte

SignedPreKeySignature returns the signature over the signed PreKey.

Source Files

PreKeyBundle.go

Version
v0.1.2 (latest)
Published
Feb 12, 2025
Platform
linux/amd64
Imports
3 packages
Last checked
3 days ago

Tools for package owners.