util

package
v0.4.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoEncryptionKey = errors.New("no encryption key provided")

Functions

func NewDecrypterReadCloser

func NewDecrypterReadCloser(r io.ReadCloser, key *[32]byte) io.ReadCloser

NewDecrypterReadCloser wraps a data stream with decryption using the provided key.

func NewEncrypterReadCloser

func NewEncrypterReadCloser(r io.ReadCloser, key *[32]byte, size int64) io.ReadCloser

NewEncrypterReadCloser wraps a data stream with encryption using the provided key. The size of the stream is required ahead of time to provide an offset for the message authentication signature.

func NewGunzipReadCloser

func NewGunzipReadCloser(r io.ReadCloser) io.ReadCloser

NewGunzipReadCloser wraps a data stream with a gzip.Reader.

func NewGzipReadCloser

func NewGzipReadCloser(r io.ReadCloser) io.ReadCloser

NewGzipReadCloser wraps a data stream with a gzip.Writer. If encryption is also detected, gzip should not use compression.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL