sec

package
v0.31.33 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init added in v0.30.9

func Init(defMediaType string)

Types

type Pipe

type Pipe struct {
	In  core.DID
	Out core.DID
}

Pipe is a secure way to transport data between DID connection. All agent to agent communication uses it. For its internal structure we must define the direction of the pipe.

func NewPipeByVerkey

func NewPipeByVerkey(did core.DID, verkey string, route []string) *Pipe

NewPipeByVerkey creates a new secure pipe by our DID and other end's public key.

func (Pipe) EA

func (p Pipe) EA() (ae service.Addr, err error)

EA returns endpoint of the agent.

func (Pipe) IsNull

func (p Pipe) IsNull() bool

IsNull returns true if pipe is null.

func (Pipe) Pack

func (p Pipe) Pack(src []byte) (dst []byte, vk string, err error)

Pack packs the byte slice and returns verification key as well.

func (Pipe) Unpack

func (p Pipe) Unpack(src []byte) (dst []byte, vk string, err error)

Unpack unpacks the source bytes and returns our verification key as well.

Jump to

Keyboard shortcuts

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