Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ShutdownErr = errors.New("panda: shutdown requested")
Functions ¶
func IsAcceptableSecretString ¶
IsAcceptableSecretString returns true if s should be accepted as a secret string. The only strings that will be rejected are those that start with generatedSecretStringPrefix but don't have a matching checksum.
func NewSecretString ¶
NewSecretString generates a random, human readable string with a special form that includes a checksum which allows typos to be rejected (so long as the typo isn't in the first two letters).
Types ¶
type Card ¶
type Card struct {
// contains filtered or unexported fields
}
Card represents a playing card (except for the jokers).
type CardStack ¶
type CardStack struct { NumDecks int // contains filtered or unexported fields }
func (*CardStack) Canonicalise ¶
func (*CardStack) MinimumDecks ¶
type HTTPMeetingPlace ¶
func (*HTTPMeetingPlace) Exchange ¶
func (hmp *HTTPMeetingPlace) Exchange(log func(string, ...interface{}), id, message []byte, shutdown chan struct{}) ([]byte, error)
func (*HTTPMeetingPlace) Padding ¶
func (hmp *HTTPMeetingPlace) Padding() int
type KeyExchange ¶
type KeyExchange struct { sync.Mutex Log func(string, ...interface{}) Testing bool ShutdownChan chan struct{} // contains filtered or unexported fields }
func NewKeyExchange ¶
func NewKeyExchange(rand io.Reader, meetingPlace MeetingPlace, sharedSecret *SharedSecret, kxBytes []byte) (*KeyExchange, error)
func UnmarshalKeyExchange ¶
func UnmarshalKeyExchange(rand io.Reader, meetingPlace MeetingPlace, serialised []byte) (*KeyExchange, error)
func (*KeyExchange) Marshal ¶
func (kx *KeyExchange) Marshal() []byte
func (*KeyExchange) Run ¶
func (kx *KeyExchange) Run() ([]byte, error)
type MeetingPlace ¶
type SharedSecret ¶
type SharedSecret struct {
type SimpleMeetingPlace ¶
func NewSimpleMeetingPlace ¶
func NewSimpleMeetingPlace() *SimpleMeetingPlace
func (*SimpleMeetingPlace) Exchange ¶
func (smp *SimpleMeetingPlace) Exchange(log func(string, ...interface{}), id, message []byte, shutdown chan struct{}) ([]byte, error)
func (*SimpleMeetingPlace) Padding ¶
func (smp *SimpleMeetingPlace) Padding() int
Click to show internal directories.
Click to hide internal directories.