Versions in this module Expand all Collapse all v0 v0.1.0 Dec 6, 2015 Changes in this version + var ErrInvalidLengthMarker = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthPlan = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthVault = fmt.Errorf("proto: negative length found during unmarshaling") + var ErrInvalidLengthVcrypt = fmt.Errorf("proto: negative length found during unmarshaling") + func Armor(msg Message) ([]byte, error) + func Marshal(msg Message) ([]byte, error) + type Driver interface + LoadSecret func(secret.Secret) (data [][]byte, skip bool, err error) + LockPayload func(io.Reader) (payload.Payload, []byte, error) + type Envelope struct + Material *material.Material + Plan *Plan + Vault *Vault + func Wrap(msg Message) (*Envelope, error) + func (*Envelope) ProtoMessage() + func (e *Envelope) Message() (Message, error) + func (m *Envelope) Marshal() (data []byte, err error) + func (m *Envelope) MarshalTo(data []byte) (int, error) + func (m *Envelope) Reset() + func (m *Envelope) Size() (n int) + func (m *Envelope) String() string + func (m *Envelope) Unmarshal(data []byte) error + func (this *Envelope) GetValue() interface{} + func (this *Envelope) SetValue(value interface{}) bool + type Graph struct + func BuildGraph(nodes []*Node) (*Graph, error) + func NewGraph(cptx cryptex.Cryptex) (*Graph, error) + func (g *Graph) Add(val interface{}, from *graph.Vertex) (*graph.Vertex, error) + func (g *Graph) Nodes() ([]*Node, error) + type Marker struct + Comment string + func (*Marker) ProtoMessage() + func (m *Marker) Marshal() (data []byte, err error) + func (m *Marker) MarshalTo(data []byte) (int, error) + func (m *Marker) Reset() + func (m *Marker) Size() (n int) + func (m *Marker) String() string + func (m *Marker) Unmarshal(data []byte) error + type Message interface + Comment func() string + Digest func() ([]byte, error) + Marshal func() (data []byte, err error) + Unmarshal func(data []byte) error + func Unarmor(data []byte) (Message, []byte, error) + func Unmarshal(data []byte) (Message, error) + type Node struct + Inputs [][]byte + Marker *Marker + Nonce []byte + func NewCryptexNode(cptx cryptex.Cryptex, inputs [][]byte) (*Node, error) + func NewMarkerNode(mrkr *Marker) (*Node, error) + func NewSecretNode(sec secret.Secret) (*Node, error) + func (*Node) ProtoMessage() + func (m *Node) Marshal() (data []byte, err error) + func (m *Node) MarshalTo(data []byte) (int, error) + func (m *Node) Reset() + func (m *Node) Size() (n int) + func (m *Node) String() string + func (m *Node) Unmarshal(data []byte) error + func (n *Node) Comment() (string, error) + func (n *Node) Cryptex() (cryptex.Cryptex, error) + func (n *Node) Digest() ([]byte, error) + func (n *Node) Secret() (secret.Secret, error) + func (n *Node) Type() NodeType + func (this *Node) GetValue() interface{} + func (this *Node) SetValue(value interface{}) bool + type NodeType int + const CryptexNode + const MarkerNode + const SecretNode + type Plan struct + Nodes []*Node + Nonce []byte + func BuildPlan(r io.Reader) (*Plan, error) + func NewPlan(g *Graph, comment string) (*Plan, error) + func (*Plan) ProtoMessage() + func (m *Plan) Marshal() (data []byte, err error) + func (m *Plan) MarshalTo(data []byte) (int, error) + func (m *Plan) Reset() + func (m *Plan) Size() (n int) + func (m *Plan) String() string + func (m *Plan) Unmarshal(data []byte) error + func (p *Plan) AddSeal(slr Sealer) (seal.Seal, error) + func (p *Plan) BFS(fn func(*Node) error) error + func (p *Plan) Comment() string + func (p *Plan) Digest() ([]byte, error) + func (p *Plan) Graph() (*Graph, error) + func (p *Plan) Seals() ([]seal.Seal, error) + type Sealer interface + Seal func([]byte) (seal.Seal, error) + type Vault struct + Materials []*material.Material + Nonce []byte + Plan *Plan + func NewVault(plan *Plan, comment string) (*Vault, error) + func (*Vault) ProtoMessage() + func (m *Vault) Marshal() (data []byte, err error) + func (m *Vault) MarshalTo(data []byte) (int, error) + func (m *Vault) Reset() + func (m *Vault) Size() (n int) + func (m *Vault) String() string + func (m *Vault) Unmarshal(data []byte) error + func (v *Vault) Comment() string + func (v *Vault) Digest() ([]byte, error) + func (v *Vault) Lock(r io.Reader, drv Driver) error + func (v *Vault) Payload() (payload.Payload, error) + func (v *Vault) Seals() ([]seal.Seal, error) + func (v *Vault) Unlock(w io.Writer, drv Driver) (unlocked bool, err error)