anoncrypt

package
v0.1.6-0...-5c25bcb Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packer

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

Packer represents an Anoncrypt Pack/Unpacker that outputs/reads Aries envelopes.

func New

func New(ctx packer.Provider, encAlg jose.EncAlg) (*Packer, error)

New will create an Packer instance to 'AnonCrypt' payloads for a given list of recipients. The returned Packer contains all the information required to pack and unpack payloads.

func (*Packer) EncodingType

func (p *Packer) EncodingType() string

EncodingType for didcomm.

func (*Packer) Pack

func (p *Packer) Pack(payload, _ []byte, recipientsPubKeys [][]byte) ([]byte, error)

Pack will encode the payload argument Using the protocol defined by the Anoncrypt message of Aries RFC 0334 Anoncrypt ignores the sender argument, it's added to meet the Packer interface.

func (*Packer) Unpack

func (p *Packer) Unpack(envelope []byte) (*transport.Envelope, error)

Unpack will decode the envelope using a standard format.

Jump to

Keyboard shortcuts

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