unidentifiedAccess

package
v0.0.0-...-4abcc0c Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCertificateEmpty = errors.New("certificate is empty")

Functions

func CheckCertificate

func CheckCertificate(certificate []byte) error

func DeriveAccessKeyFrom

func DeriveAccessKeyFrom(profileKey []byte) ([]byte, error)

func GetAccessFor

func GetAccessFor(recipents []contacts.Contact) (*[]UnidentifiedAccessPair, error)

func GetOurCertificate

func GetOurCertificate() ([]byte, error)

func GetTargetUnidentifiedAccessKey

func GetTargetUnidentifiedAccessKey(contact contacts.Contact) ([]byte, error)

Types

type UnidentifiedAccess

type UnidentifiedAccess struct {
	UnidentifiedAccessKey   []byte `json:"unidentifiedAccessKey"`
	UnidentifiedCertificate []byte `json:"unidentifiedCertificate"`
}

func GetAccessForSync

func GetAccessForSync(profileKey []byte, cert []byte) (*UnidentifiedAccess, error)

func (*UnidentifiedAccess) GetTargetUnidentifiedAccess

func (u *UnidentifiedAccess) GetTargetUnidentifiedAccess(contact contacts.Contact) (*UnidentifiedAccessPair, error)

type UnidentifiedAccessPair

type UnidentifiedAccessPair struct {
	TargetUnidentifiedAccess UnidentifiedAccess `json:"targetUnidentifiedAccess"`
	SelfUnidentifiedAccess   UnidentifiedAccess `json:"selfUnidentifiedAccess"`
}

func GetAccessForUUID

func GetAccessForUUID(recipent contacts.Contact) (*UnidentifiedAccessPair, error)

func (*UnidentifiedAccessPair) GetTargetKey

func (uap *UnidentifiedAccessPair) GetTargetKey() []byte

Jump to

Keyboard shortcuts

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