Documentation ¶
Index ¶
Constants ¶
const KeySize = 32
Size (in bytes) of the key for NaCl box seal/open
const MaxMessageSize = 32 * 1024
Size (in bytes) of the max message size supported by this package
const NonceSize = 24
Size (in bytes) of the nonce for NaCl box seal/open
Variables ¶
var ErrDecrypt = errors.New("decrypt error")
ErrDecrypt means that there was a problem during decryption
var ErrEncWrite = errors.New("failed to write complete encrypted message")
ErrEncWrite means that a complete encrypted message was unable to be written
var ErrNonceSize = errors.New("not enough bytes read for nonce")
ErrNonceSize means that the source of randomness did not provide enough bytes for a complete nonce
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
A Reader is an io.Reader that can be used to read streams of encrypted data that was encrypted using the Writer from this package. The Reader will decrypt and return the plaintext from the provided io.Reader.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
A Writer is an io.Writer which will encrypt the provided data and write it to the provided wrapped io.Writer