Documentation ¶
Overview ¶
Package encio provides encrypted using AES-256-CFB input/output functions.
Encrypted container structure is the following:
|__...__|____________... 0 ^ 16 ^ | +-- encrypted data +----------- 16 bytes IV
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDecrypt = errors.New("decryption error")
Functions ¶
func Create ¶
func Create(filename string) (io.WriteCloser, error)
Create creates an encrypted file container.
func NewReader ¶
NewReader wraps the ciphertext reader, and returns the reader that a plaintext can be read from.
func NewWriter ¶
func NewWriter(w io.Writer) (io.WriteCloser, error)
NewWriter wraps the writer and returns the WriteCloser. Any information written to the writer is encrypted with the hashed machineID. WriteCloser must be closed to flush any buffered data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.