aescrypt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package aescrypt provides a reader to decrypt .aes files. You can find info about the file format here https://www.aescrypt.com/

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalid       = errors.New("invalid .aes file")
	ErrTruncated     = errors.New("truncated file")
	ErrCorrupt       = errors.New("corrupt file")
	ErrWrongPassword = errors.New("wrong password")
)

Functions

This section is empty.

Types

type Decrypter

type Decrypter struct {

	// Will contain extensions provided by the file. A list of standard extensions
	// can be found here https://www.aescrypt.com/standard_extensions.html.
	// User defined extensions may also be possible.
	Extensions []string
	// contains filtered or unexported fields
}

File decrypter that contains the file state and implements the reader interface. Create one by calling NewDecrypter

func NewDecrypter

func NewDecrypter(in io.Reader, password string) (d *Decrypter, err error)

NewDecrypter creates a decypter to read .aes files.

func (*Decrypter) Read

func (d *Decrypter) Read(b []byte) (n int, err error)

Read and decrypt contents. Due to the nature of the file format, file corruptions can be detected, but only if every block has been read. That means the last read call before/with EOF will return an error if the file is corrupted at any block.

Jump to

Keyboard shortcuts

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