msg

package
v0.0.0-...-f661f07 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2013 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Service = ":6038"

Variables

Functions

func ReadBlock

func ReadBlock(r io.Reader, lengthMax uint16) ([]byte, error)

func ValidateSignatureRequest

func ValidateSignatureRequest(m *msgs.SignatureRequest) error

Does not check keySignature

func ValidateVote

func ValidateVote(ballotKey *rsa.PublicKey, m *msgs.Vote) error

func WriteBlock

func WriteBlock(w io.Writer, messageType Type, data []byte) error

Types

type Type

type Type uint16
const (
	SignatureRequest Type = iota
	SignatureResponse
	Vote
	VoteResponse
	KeySignatureRequest
	KeySignatureResponse

	InvalidRequest
)

func ReadType

func ReadType(r io.Reader) (Type, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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