spipe

package
v0.0.0-...-e4696f9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2014 License: MIT Imports: 20 Imported by: 0

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

func SelectBest(myPrefs, theirPrefs string) (string, error)

Determines which algorithm to use. Note: f(a, b) = f(b, a)

Types

type SecurePipe

type SecurePipe struct {
	pipes.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, insecure pipes.Duplex) (*SecurePipe, error)

NewSecurePipe constructs a pipe with channels of a given buffer size.

func (*SecurePipe) Close

func (s *SecurePipe) Close() error

Close closes the secure pipe

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.

Directories

Path Synopsis
internal
pb
Package spipe_pb is a generated protocol buffer package.
Package spipe_pb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL