packer

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.0 Imports: 1 Imported by: 11

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:
	// 		[]byte containing the decrypted payload
	//		error if decryption failed
	// TODO add key type of recipients keys to be validated by the implementation - Issue #272
	Unpack(envelope []byte) ([]byte, 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
}

Provider interface for Packer ctx

Directories

Path Synopsis
jwe
legacy

Jump to

Keyboard shortcuts

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