crypt

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Unlicense Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCryptReader

func GetCryptReader(key *memguard.LockedBuffer, fname string) (r io.Reader, s int, err error)

GetCryptReader returns a new io.Reader that reads and encrypts the specified filename

func GetCryptWriter

func GetCryptWriter(key *memguard.LockedBuffer, dir, fname string) (w io.WriteCloser, err error)

GetCryptWriter returns a new io.WriteCloser that will decrypt data written to it. Plaintext will be saved under the specified directory with chosen filename.

This writer has 2 bytes already written to it in order to initialize the underlying AES instance.

func GetGCM

func GetGCM(key *memguard.LockedBuffer, size int) (gcm cipher.AEAD, err error)

GetGCM returns a new AES GCM cipher with optional custom nonce size

Types

This section is empty.

Jump to

Keyboard shortcuts

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