Documentation
¶
Overview ¶
Package spipe is a generated protocol buffer package.
It is generated from these files:
message.proto
It has these top-level messages:
Propose Exchange
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosed = errors.New("connection closed")
ErrClosed signals the closing of a connection.
View Source
var ErrUnsupportedKeyType = errors.New("unsupported key type")
ErrUnsupportedKeyType is returned when a private key cast/type switch fails.
View Source
var SupportedCiphers = "AES-256,AES-128"
List of supported Ciphers
View Source
var SupportedExchanges = "P-256,P-224,P-384,P-521"
List of supported ECDH curves
View Source
var SupportedHashes = "SHA256,SHA512,SHA1"
List of supported Hashes
Functions ¶
Types ¶
type Exchange ¶
type Exchange struct { Epubkey []byte `protobuf:"bytes,1,opt,name=epubkey" json:"epubkey,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature" json:"signature,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Exchange) GetEpubkey ¶
func (*Exchange) GetSignature ¶
func (*Exchange) ProtoMessage ¶
func (*Exchange) ProtoMessage()
type Propose ¶
type Propose struct { Rand []byte `protobuf:"bytes,1,opt,name=rand" json:"rand,omitempty"` Pubkey []byte `protobuf:"bytes,2,opt,name=pubkey" json:"pubkey,omitempty"` Exchanges *string `protobuf:"bytes,3,opt,name=exchanges" json:"exchanges,omitempty"` Ciphers *string `protobuf:"bytes,4,opt,name=ciphers" json:"ciphers,omitempty"` Hashes *string `protobuf:"bytes,5,opt,name=hashes" json:"hashes,omitempty"` XXX_unrecognized []byte `json:"-"` }
func (*Propose) GetCiphers ¶
func (*Propose) GetExchanges ¶
func (*Propose) ProtoMessage ¶
func (*Propose) ProtoMessage()
type SecurePipe ¶
type SecurePipe struct { Duplex // contains filtered or unexported fields }
SecurePipe objects represent a bi-directional message channel.
func NewSecurePipe ¶
func NewSecurePipe(ctx context.Context, bufsize int, local *peer.Peer, peers peer.Peerstore) (*SecurePipe, error)
NewSecurePipe constructs a pipe with channels of a given buffer size.
func (*SecurePipe) LocalPeer ¶
func (s *SecurePipe) LocalPeer() *peer.Peer
LocalPeer retrieves the local peer.
func (*SecurePipe) RemotePeer ¶
func (s *SecurePipe) RemotePeer() *peer.Peer
RemotePeer retrieves the local peer.
Click to show internal directories.
Click to hide internal directories.