packer

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Creator

type Creator func(prov Provider) (Packer, error)

Creator method to create new Packer service.

type Packer

type Packer interface {
	// Pack a payload in an Aries compliant format using the sender keypair
	// and a list of recipients public keys
	// returns:
	// 		[]byte containing the encrypted envelope
	//		error if encryption failed
	// TODO add key type of recipients and sender keys to be validated by the implementation - Issue #272
	Pack(payload []byte, senderKey []byte, recipients [][]byte) ([]byte, error)
	// Unpack an envelope in an Aries compliant format.
	// 		The recipient's key will be the one found in KMS that matches one of the list of recipients in the envelope
	//
	// returns:
	// 		Envelope containing the message, decryption key, and sender key
	//		error if decryption failed
	// TODO add key type of recipients keys to be validated by the implementation - Issue #272
	Unpack(envelope []byte) (*transport.Envelope, error)

	// Encoding returns the type of the encoding, as found in the header `Typ` field
	EncodingType() string
}

Packer is an Aries envelope packer/unpacker to support secure DIDComm exchange of envelopes between Aries agents.

type Provider

type Provider interface {
	KMS() kms.KeyManager
	Crypto() cryptoapi.Crypto
	StorageProvider() storage.Provider
}

Provider interface for Packer ctx.

Directories

Path Synopsis
legacy

Jump to

Keyboard shortcuts

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