memspool: github.com/katzenpost/memspool/common Index | Files

package common

import "github.com/katzenpost/memspool/common"

Index

Package Files

request_response.go

Constants

const (
    SpoolIDSize     = 12
    SignatureSize   = 64
    PublicKeySize   = 32
    MessageIDSize   = 4
    ResponsePadding = 121
    QueryOverhead   = 171

    CreateSpoolCommand     = 0
    PurgeSpoolCommand      = 1
    AppendMessageCommand   = 2
    RetrieveMessageCommand = 3

    SpoolServiceName = "spool"
)

func AppendToSpool Uses

func AppendToSpool(spoolID [SpoolIDSize]byte, message []byte) ([]byte, error)

func CreateSpool Uses

func CreateSpool(privKey *eddsa.PrivateKey) ([]byte, error)

func PurgeSpool Uses

func PurgeSpool(spoolID [SpoolIDSize]byte, privKey *eddsa.PrivateKey) ([]byte, error)

func ReadFromSpool Uses

func ReadFromSpool(spoolID [SpoolIDSize]byte, messageID uint32, privKey *eddsa.PrivateKey) ([]byte, error)

type SpoolRequest Uses

type SpoolRequest struct {
    Command byte

    // SpoolID identities a spool on a particular Provider host.
    // This field must be SpoolIDSize bytes long.
    SpoolID   []byte
    Signature []byte
    PublicKey []byte
    MessageID uint32
    Message   []byte
}

func SpoolRequestFromBytes Uses

func SpoolRequestFromBytes(raw []byte) (SpoolRequest, error)

func (*SpoolRequest) Encode Uses

func (s *SpoolRequest) Encode() ([]byte, error)

type SpoolResponse Uses

type SpoolResponse struct {
    SpoolID []byte
    Message []byte
    Status  string
    Padding []byte
}

func SpoolResponseFromBytes Uses

func SpoolResponseFromBytes(raw []byte) (SpoolResponse, error)

func (*SpoolResponse) Encode Uses

func (s *SpoolResponse) Encode() ([]byte, error)

Package common imports 2 packages (graph) and is imported by 4 packages. Updated 2019-06-15. Refresh now. Tools for package owners.