anoncrypt

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2023 License: Apache-2.0 Imports: 11 Imported by: 2

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(contentType string, 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. It uses DIDComm typ V2 header value (default envelope 'typ' protected header).

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