Documentation
¶
Index ¶
- Constants
- Variables
- func Base64Dec(b64 string) ([]byte, error)
- func Base64Enc(data []byte) string
- func BlockCopy(dst io.Writer, src BlockReader) (written int64, err error)
- func Init() error
- type BlockReader
- type EphPK
- type EphSK
- type Identity
- type SignPK
- type SignSK
- type Stream
- type SymK
- type TrustCB
Constants ¶
View Source
const Protocol = "zeolite1"
Variables ¶
View Source
var ( ErrInit = errors.New("could not initialize libsodium") ErrEOS = errors.New("end of stream reached") ErrRecv = errors.New("could not receive") ErrSend = errors.New("could not send") ErrProto = errors.New("protocol violation") ErrKeygen = errors.New("key generation failed") ErrTrust = errors.New("no trust") ErrSign = errors.New("could not sign") ErrVerify = errors.New("could not verify") ErrEncrypt = errors.New("could not encrypt") ErrDecrypt = errors.New("could not decrypt") )
Functions ¶
Types ¶
type BlockReader ¶
type EphPK ¶
type EphPK [C.crypto_box_PUBLICKEYBYTES]byte
type EphSK ¶
type EphSK [C.crypto_box_SECRETKEYBYTES]byte
type Identity ¶
func NewIdentity ¶
type SignPK ¶
type SignPK [C.crypto_sign_PUBLICKEYBYTES]byte
type SignSK ¶
type SignSK [C.crypto_sign_SECRETKEYBYTES]byte
type Stream ¶
type Stream struct { Conn io.ReadWriter OtherPK SignPK SendState C.crypto_secretstream_xchacha20poly1305_state RecvState C.crypto_secretstream_xchacha20poly1305_state }
type SymK ¶
type SymK [C.crypto_secretstream_xchacha20poly1305_KEYBYTES]byte
Click to show internal directories.
Click to hide internal directories.