Documentation ¶ Index ¶ type Reader func NewReader(reader io.Reader, nonce [24]byte, sharedKey *[32]byte) *Reader func (r *Reader) Read(p []byte) (int, error) type Writer func NewWriter(writer io.Writer, nonce [24]byte, sharedKey *[32]byte) *Writer func (e *Writer) Write(p []byte) (n int, err error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Reader ¶ type Reader struct { // contains filtered or unexported fields } Reader ... func NewReader ¶ func NewReader( reader io.Reader, nonce [24]byte, sharedKey *[32]byte, ) *Reader NewReader ... func (*Reader) Read ¶ func (r *Reader) Read(p []byte) (int, error) Read : reads from underlying io.reader and encryopts the data as it passes it to given inpout do not call directly, use io.Copy and dump read data to a bytes.Buffer type Writer ¶ type Writer struct { // contains filtered or unexported fields } Writer ... func NewWriter ¶ func NewWriter( writer io.Writer, nonce [24]byte, sharedKey *[32]byte, ) *Writer NewWriter ... func (*Writer) Write ¶ func (e *Writer) Write(p []byte) (n int, err error) encrypt .. Source Files ¶ View all Source files reader.go writer.go Click to show internal directories. Click to hide internal directories.