Documentation ¶
Overview ¶
Package sbox is a generated protocol buffer package.
It is generated from these files:
box.proto
It has these top-level messages:
Key Box Payload
Index ¶
- Variables
- func GenerateKey() (string, error)
- func Open(data []byte, receiverKey, masterKey string) ([]byte, error)
- func PublicKey(privateKey string) (string, error)
- func Seal(data []byte, masterKey string, receiverKeys []string) ([]byte, error)
- type Box
- func (*Box) Descriptor() ([]byte, []int)
- func (m *Box) GetKeys() []*Key
- func (m *Box) GetPayload() *Payload
- func (m *Box) Marshal() (dAtA []byte, err error)
- func (m *Box) MarshalTo(dAtA []byte) (int, error)
- func (*Box) ProtoMessage()
- func (m *Box) Reset()
- func (m *Box) Size() (n int)
- func (m *Box) String() string
- func (m *Box) Unmarshal(dAtA []byte) error
- type Key
- type Payload
- func (*Payload) Descriptor() ([]byte, []int)
- func (m *Payload) Marshal() (dAtA []byte, err error)
- func (m *Payload) MarshalTo(dAtA []byte) (int, error)
- func (*Payload) ProtoMessage()
- func (m *Payload) Reset()
- func (m *Payload) Size() (n int)
- func (m *Payload) String() string
- func (m *Payload) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthBox = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowBox = fmt.Errorf("proto: integer overflow") )
Functions ¶
Types ¶
type Box ¶
type Box struct { Keys []*Key `protobuf:"bytes,1,rep,name=keys" json:"keys,omitempty"` Payload *Payload `protobuf:"bytes,2,opt,name=payload" json:"payload,omitempty"` }
func (*Box) Descriptor ¶
func (*Box) GetPayload ¶
func (*Box) ProtoMessage ¶
func (*Box) ProtoMessage()
type Key ¶
type Key struct { PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` BoxKey []byte `protobuf:"bytes,3,opt,name=box_key,json=boxKey,proto3" json:"box_key,omitempty"` }
func (*Key) Descriptor ¶
func (*Key) ProtoMessage ¶
func (*Key) ProtoMessage()
type Payload ¶
type Payload struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
func (*Payload) Descriptor ¶
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.