anoncryt

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: 17 Imported by: 1

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 legacy Aries envelopes.

func New

func New(ctx packer.Provider) *Packer

New will create a Packer that encrypts messages using the legacy Aries format. Note: legacy Packer does not support XChacha20Poly1035 (XC20P), only Chacha20Poly1035 (C20P).

func (*Packer) EncodingType

func (p *Packer) EncodingType() string

EncodingType returns the type of the encoding, as in the `Typ` field of the envelope header.

func (*Packer) Pack

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

Pack will encode the payload argument Using the protocol defined by Aries RFC 0019.

func (*Packer) Unpack

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

Unpack will decode the envelope using the legacy format Using (X)Chacha20 encryption algorithm and Poly1035 authenticator.

Jump to

Keyboard shortcuts

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