Documentation ¶
Overview ¶
package spipe handles establishing secure communication between two peers.
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,Blowfish"
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"
List of supported Hashes
Functions ¶
func SelectBest ¶
Determines which algorithm to use. Note: f(a, b) = f(b, a)
Types ¶
type SecurePipe ¶
SecurePipe objects represent a bi-directional message channel.
func NewSecurePipe ¶
func NewSecurePipe(ctx context.Context, bufsize int, local peer.Peer, peers peer.Peerstore, insecure pipes.Duplex) (*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.