Versions in this module Expand all Collapse all v1 v1.0.18 Oct 26, 2016 Changes in this version + const DefaultPlaintextChunkLength + const NonceSize + const SecretboxKeySize + const SecretboxNonceSize + const SignaturePrefix + func GetSealedSize(plaintextLen int) int + func NewDecodingReader(encKey SecretboxKey, verifyKey VerifyKey, nonce Nonce, innerReader io.Reader) io.Reader + func NewEncodingReader(encKey SecretboxKey, signKey SignKey, nonce Nonce, innerReader io.Reader) io.Reader + func NewError(errorType ErrorType, message string, args ...interface{}) error + func OpenWhole(sealed []byte, encKey SecretboxKey, verifyKey VerifyKey, nonce Nonce) ([]byte, error) + func SealWhole(plaintext []byte, encKey SecretboxKey, signKey SignKey, nonce Nonce) []byte + type Decoder struct + func NewDecoder(encKey SecretboxKey, verifyKey VerifyKey, nonce Nonce) *Decoder + func (d *Decoder) ChangePlaintextChunkLenForTesting(plaintextChunkLen int) + func (d *Decoder) Finish() ([]byte, error) + func (d *Decoder) Write(ciphertext []byte) ([]byte, error) + type Encoder struct + func NewEncoder(encKey SecretboxKey, signKey SignKey, nonce Nonce) *Encoder + func (e *Encoder) ChangePlaintextChunkLenForTesting(plaintextChunkLen int) + func (e *Encoder) Finish() []byte + func (e *Encoder) Write(plaintext []byte) []byte + type Error struct + Message string + Type ErrorType + func (e Error) Error() string + type ErrorType int + const BadSecretbox + const BadSignature + const ShortSignature + type Nonce *[NonceSize]byte + type SecretboxKey *[SecretboxKeySize]byte + type SecretboxNonce *[SecretboxNonceSize]byte + type SignKey *[ed25519.PrivateKeySize]byte + type VerifyKey *[ed25519.PublicKeySize]byte