envelope

package
v0.0.0-...-fcbc9cf Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pack

func Pack(handle wallet.Wallet, message []byte, receiverKeys []string, senderKey string) ([]byte, error)

Pack

Wrap a plaintext message in an encrypted envelope

handle: handle to the wallet that contains the sender's secrets.

message: the message (plaintext, or nested encrypted envelope) as a string.

If it's JSON object it should be in string format first

receiverKeys: a list of recipient keys as string containing a JSON array

senderKey: the sender's key as a string. This key is used to look up the sender's

private key so the wallet can put supply it as input to the encryption
algorithm. When an empty string ("") is passed in this parameter,
anoncrypt mode is used

func Unpack

func Unpack(handle wallet.Wallet, packed []byte) (msg []byte, err error)

Unpack

Unwrap encrypted envelopes in to the plaintext messages

handle: wallet handle that contains the sender key

message: an encrypted message envelope which follows the scheme format described here:

https://github.com/hyperledger/aries-rfcs/blob/master/features/0019-encryption-envelope/schema.md

Types

This section is empty.

Jump to

Keyboard shortcuts

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