Documentation
¶
Overview ¶
Package seal is a generated protocol buffer package.
It is generated from these files:
seal/seal.proto seal/openpgp.proto
It has these top-level messages:
Envelope
Index ¶
- Variables
- func Marshal(s Seal) ([]byte, error)
- type Envelope
- func (m *Envelope) GetOpenpgp() *OpenPGP
- func (this *Envelope) GetValue() interface{}
- func (m *Envelope) Marshal() (data []byte, err error)
- func (m *Envelope) MarshalTo(data []byte) (int, error)
- func (*Envelope) ProtoMessage()
- func (m *Envelope) Reset()
- func (e *Envelope) Seal() (Seal, error)
- func (this *Envelope) SetValue(value interface{}) bool
- func (m *Envelope) Size() (n int)
- func (m *Envelope) String() string
- func (m *Envelope) Unmarshal(data []byte) error
- type OpenPGP
- func (s *OpenPGP) Check(data []byte) error
- func (s *OpenPGP) Digest() ([]byte, error)
- func (m *OpenPGP) Marshal() (data []byte, err error)
- func (m *OpenPGP) MarshalTo(data []byte) (int, error)
- func (*OpenPGP) ProtoMessage()
- func (m *OpenPGP) Reset()
- func (m *OpenPGP) Size() (n int)
- func (m *OpenPGP) String() string
- func (m *OpenPGP) Unmarshal(data []byte) error
- type Seal
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidLengthOpenpgp = fmt.Errorf("proto: negative length found during unmarshaling")
)
View Source
var (
ErrInvalidLengthSeal = fmt.Errorf("proto: negative length found during unmarshaling")
)
Functions ¶
Types ¶
type Envelope ¶
type Envelope struct {
Openpgp *OpenPGP `protobuf:"bytes,1,opt,name=openpgp" json:"openpgp,omitempty"`
}
func (*Envelope) GetOpenpgp ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
type OpenPGP ¶
type OpenPGP struct { Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` Entity []byte `protobuf:"bytes,2,opt,name=entity,proto3" json:"entity,omitempty"` Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` }
func NewOpenPGP ¶
NewOpenPGP constructs an OpenPGP seal from an OpenPGP entity and signing data. The entity must contain a signing private key.
func (*OpenPGP) Check ¶
Check verifies the OpenPGP signature for the data using the signing public key in the entity.
func (*OpenPGP) ProtoMessage ¶
func (*OpenPGP) ProtoMessage()
type Seal ¶
type Seal interface { // Check verifies the seal for the data. Check(data []byte) error // Digest returns a unique series of bytes that identify the Seal. Digest() ([]byte, error) // Marshal returns the binary representation of the Seal. Marshal() (data []byte, err error) // Unmarshal parses the Seal encoded in data. Unmarshal(data []byte) error }
Seal holds a verifiable signature.
Click to show internal directories.
Click to hide internal directories.