Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CryptoClient ¶
type CryptoClient struct { Provider config.MixConfig Network NetworkPKI // contains filtered or unexported fields }
func NewCryptoClient ¶
func NewCryptoClient(pubKey, privKey []byte, curve elliptic.Curve, provider config.MixConfig, network NetworkPKI) *CryptoClient
func (*CryptoClient) DecodeMessage ¶
func (c *CryptoClient) DecodeMessage(packet sphinx.SphinxPacket) (sphinx.SphinxPacket, error)
DecodeMessage decodes the received sphinx packet. TODO: this function is finished yet.
func (*CryptoClient) EncodeMessage ¶
func (c *CryptoClient) EncodeMessage(message string, recipient config.ClientConfig) ([]byte, error)
EncodeMessage encodes given message into the Sphinx packet format. EncodeMessage takes as inputs the message and the recipient's public configuration. EncodeMessage returns the byte representation of the packet or an error if the packet could not be created.
func (*CryptoClient) GetPublicKey ¶
func (c *CryptoClient) GetPublicKey() []byte
type MixClient ¶
type MixClient interface { EncodeIntoSphinxPacket(message string, recipient config.ClientConfig) ([]byte, error) DecodeSphinxPacket(packet sphinx.SphinxPacket) (sphinx.SphinxPacket, error) GetPublicKey() []byte }
type NetworkPKI ¶
type NetworkPKI struct { Mixes []config.MixConfig Clients []config.ClientConfig }
Click to show internal directories.
Click to hide internal directories.