Documentation
¶
Index ¶
- Constants
- func CheckAuthWith(prt ProfileRatchet) func([]byte, []byte, []byte, *[32]byte) error
- func CreateAccount(conn *transport.Conn, inBuf []byte) error
- func CreateTestAccount(name string, denameClient *client.Client, ...) *transport.Conn
- func CreateTestDenameAccount(name string, denameClient *client.Client, ...)
- func CreateTestHomeServerConn(dename string, denameClient *client.Client, ...) *transport.Conn
- func DecryptAuth(in []byte, ratch *ratchet.Ratchet) (*ratchet.Ratchet, []byte, error)
- func DecryptAuthFirst(in []byte, pkList []*[32]byte, skList []*[32]byte, skAuth *[32]byte, ...) (*ratchet.Ratchet, []byte, int, error)
- func DeleteMessages(connToServer *ConnectionToServer, messageList []*[32]byte) error
- func EnablePush(connToServer *ConnectionToServer) error
- func EncryptAuth(message []byte, ratch *ratchet.Ratchet) ([]byte, *ratchet.Ratchet, error)
- func EncryptAuthFirst(message []byte, skAuth *[32]byte, userKey *[32]byte, prt ProfileRatchet) ([]byte, *ratchet.Ratchet, error)
- func FillAuthWith(ourAuthPrivate *[32]byte) func([]byte, []byte, *[32]byte)
- func GenerateLongTermKeys(secretConfig *proto.LocalAccountConfig, publicProfile *proto.Profile, ...) error
- func GetKey(conn *transport.Conn, inBuf []byte, pk *[32]byte, dename string, ...) (*[32]byte, error)
- func GetNumKeys(connToServer *ConnectionToServer) (int64, error)
- func ListUserMessages(connToServer *ConnectionToServer) ([]*[32]byte, error)
- func NewAnonDialer(torAddr string) proxy.Dialer
- func ReceiveProtobuf(conn *transport.Conn, inBuf []byte) (*proto.ServerToClient, error)
- func ReceiveReply(connToServer *ConnectionToServer) (*proto.ServerToClient, error)
- func RequestMessage(connToServer *ConnectionToServer, messageHash *[32]byte) error
- func SignKeys(keys []*[32]byte, sk *[64]byte) [][]byte
- func UploadKeys(connToServer *ConnectionToServer, keyList [][]byte) error
- func UploadMessageToUser(conn *transport.Conn, inBuf []byte, pk *[32]byte, envelope []byte) error
- func WriteProtobuf(conn *transport.Conn, message *proto.ClientToServer) error
- type ConnectionCache
- type ConnectionToServer
- type EnvelopeWithId
- type ProfileRatchet
Constants ¶
View Source
const ENCRYPT_ADDED_LEN = 168
View Source
const ENCRYPT_FIRST_ADDED_LEN = 200
View Source
const PROFILE_FIELD_ID = 1984
Variables ¶
This section is empty.
Functions ¶
func CheckAuthWith ¶
func CreateTestAccount ¶
func CreateTestDenameAccount ¶
func DecryptAuth ¶
func DecryptAuthFirst ¶
func DeleteMessages ¶
func DeleteMessages(connToServer *ConnectionToServer, messageList []*[32]byte) error
func EnablePush ¶
func EnablePush(connToServer *ConnectionToServer) error
func EncryptAuth ¶
func EncryptAuthFirst ¶
func GenerateLongTermKeys ¶
func GetNumKeys ¶
func GetNumKeys(connToServer *ConnectionToServer) (int64, error)
func ListUserMessages ¶
func ListUserMessages(connToServer *ConnectionToServer) ([]*[32]byte, error)
func NewAnonDialer ¶
func ReceiveProtobuf ¶
func ReceiveReply ¶
func ReceiveReply(connToServer *ConnectionToServer) (*proto.ServerToClient, error)
func RequestMessage ¶
func RequestMessage(connToServer *ConnectionToServer, messageHash *[32]byte) error
func UploadKeys ¶
func UploadKeys(connToServer *ConnectionToServer, keyList [][]byte) error
func UploadMessageToUser ¶
func WriteProtobuf ¶
func WriteProtobuf(conn *transport.Conn, message *proto.ClientToServer) error
Types ¶
type ConnectionCache ¶
func NewConnectionCache ¶
func NewConnectionCache(dialer proxy.Dialer) *ConnectionCache
func (*ConnectionCache) DialServer ¶
func (cc *ConnectionCache) DialServer(cacheKey, addr string, port int, serverPK, pk, sk *[32]byte) (conn *transport.Conn, err error)
Caller MUST call Put or PutClose after this
func (*ConnectionCache) PutClose ¶
func (cc *ConnectionCache) PutClose(k string)
there must be a conn with the key k and no Puts to k may be issued in parallel with Close
type ConnectionToServer ¶
type ConnectionToServer struct { InBuf []byte Conn *transport.Conn ReadReply chan *proto.ServerToClient // TODO: do we want to return an error? ReadEnvelope chan *EnvelopeWithId Shutdown chan struct{} WaitShutdown sync.WaitGroup }
func (*ConnectionToServer) ReceiveMessages ¶
func (c *ConnectionToServer) ReceiveMessages() error
func (*ConnectionToServer) WriteProtobuf ¶
func (conn *ConnectionToServer) WriteProtobuf(msg *proto.ClientToServer) error
type EnvelopeWithId ¶
type ProfileRatchet ¶
Directories
¶
Path | Synopsis |
---|---|
watches the file system for new messages --> sends them communicates with the server --> receive new messages
|
watches the file system for new messages --> sends them communicates with the server --> receive new messages |
Click to show internal directories.
Click to hide internal directories.