Documentation ¶
Index ¶
- func Polish(polishCipher cipher.AEAD, chunkSize int, input []byte) ([]byte, error)
- func Unpolish(polishCipher cipher.AEAD, chunkSize int, input []byte) ([]byte, error)
- func X963KDF(sharedKeySeed []byte, ephemeralPublicKey []byte) []byte
- type ClientConfig
- type Connection
- type CurvePoint
- type Server
- type ServerConfig
- type SilverPolishClient
- type SilverPolishClientConfig
- type SilverPolishServer
- type SilverPolishServerConfig
- type SilverPolishServerConnection
- func (silver *SilverPolishServerConnection) GetChunkSize() int
- func (silver *SilverPolishServerConnection) Handshake(conn net.Conn) error
- func (silver *SilverPolishServerConnection) Polish(input []byte) ([]byte, error)
- func (silver *SilverPolishServerConnection) Unpolish(input []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientConfig ¶
type ClientConfig interface { Construct() (Connection, error) GetChunkSize() int }
type Connection ¶
type Connection interface { Handshake(conn net.Conn) error Polish(input []byte) ([]byte, error) Unpolish(input []byte) ([]byte, error) GetChunkSize() int }
func NewSilverClient ¶
func NewSilverClient(config SilverPolishClientConfig) (Connection, error)
type Server ¶
type Server interface {
NewConnection(net.Conn) Connection
}
type ServerConfig ¶
type SilverPolishClient ¶
type SilverPolishClient struct {
// contains filtered or unexported fields
}
func (SilverPolishClient) GetChunkSize ¶
func (silver SilverPolishClient) GetChunkSize() int
func (SilverPolishClient) Handshake ¶
func (silver SilverPolishClient) Handshake(conn net.Conn) error
type SilverPolishClientConfig ¶
func NewSilverClientConfig ¶
func NewSilverClientConfig(serverConfig *SilverPolishServerConfig) (*SilverPolishClientConfig, error)
func (SilverPolishClientConfig) Construct ¶
func (config SilverPolishClientConfig) Construct() (Connection, error)
func (SilverPolishClientConfig) GetChunkSize ¶
func (config SilverPolishClientConfig) GetChunkSize() int
type SilverPolishServer ¶
type SilverPolishServer struct {
// contains filtered or unexported fields
}
func NewSilverServer ¶
func NewSilverServer(config SilverPolishServerConfig) (SilverPolishServer, error)
func (SilverPolishServer) NewConnection ¶
func (config SilverPolishServer) NewConnection(conn net.Conn) Connection
type SilverPolishServerConfig ¶
type SilverPolishServerConfig struct { ServerPublicKey []byte ServerPrivateKey []byte ChunkSize int }
func NewSilverServerConfig ¶
func NewSilverServerConfig() (*SilverPolishServerConfig, error)
func (SilverPolishServerConfig) Construct ¶
func (config SilverPolishServerConfig) Construct() (Server, error)
func (SilverPolishServerConfig) GetChunkSize ¶
func (config SilverPolishServerConfig) GetChunkSize() int
type SilverPolishServerConnection ¶
type SilverPolishServerConnection struct {
// contains filtered or unexported fields
}
func (*SilverPolishServerConnection) GetChunkSize ¶
func (silver *SilverPolishServerConnection) GetChunkSize() int
func (*SilverPolishServerConnection) Handshake ¶
func (silver *SilverPolishServerConnection) Handshake(conn net.Conn) error
Click to show internal directories.
Click to hide internal directories.