Documentation ¶
Index ¶
- Variables
- func FromOffset(chunkSize, overhead int, offset uint64) int
- func GetOffset(chunkSize, overhead, index int) uint64
- func NewReader(ds io.ReadSeeker, key []byte, chunkSize int, fileSize uint64) (io.ReadSeeker, error)
- func NewWriter(ds io.Writer, key []byte, chunkSize int) (io.WriteCloser, error)
- type AESReader
- type AESWriter
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidKeyLength = errors.New("Key must be 16, 24, or 32 bytes long")
)
Functions ¶
func FromOffset ¶
FromOffset returns the index of the chunk given an offset.
func NewReader ¶
func NewReader(ds io.ReadSeeker, key []byte, chunkSize int, fileSize uint64) (io.ReadSeeker, error)
NewReader creates a new AESReader
Types ¶
type AESReader ¶
type AESReader struct {
// contains filtered or unexported fields
}
AESReader reads data from an io.Reader that was generated using AESWriter.
type AESWriter ¶
type AESWriter struct {
// contains filtered or unexported fields
}
AESWriter generates a ciphertext to an io.Writer that can be read back using AESReader
func (*AESWriter) Close ¶
Close finalizes the writes and flushes any remaining buffered data onto the writer.
func (*AESWriter) GetWritten ¶
GetWritten returns the number of ciphertext bytes written to the underlying writer.
Click to show internal directories.
Click to hide internal directories.