picocryption

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCorrupted = errors.New("data corrupted beyond repair")
View Source
var ErrDuplicateKeyfiles = errors.New("duplicate keyfiles")
View Source
var ErrHeaderUnparsable = errors.New("header unparsable")
View Source
var ErrIncorrectKeyfiles = errors.New("incorrect keyfiles")
View Source
var ErrIncorrectPassword = errors.New("incorrect password")
View Source
var ErrKeyfilesNotRequired = errors.New("keyfiles not required")
View Source
var ErrKeyfilesRequired = errors.New("missing required keyfiles")

Functions

func Decrypt

func Decrypt(
	pw string,
	kf []io.Reader,
	r io.Reader,
	w io.Writer,
	skipReedSolomon bool,
	ignoreCorruption bool,
	update chan Update,
) (bool, error)

func EncryptHeadless

func EncryptHeadless(
	in io.Reader,
	password string,
	keyfiles []io.Reader,
	settings Settings,
	out io.Writer,
	update chan Update,
) ([]byte, error)

func HeaderSize

func HeaderSize(settings Settings) int

func PrependHeader

func PrependHeader(
	headless io.Reader,
	headed io.Writer,
	header []byte,
) error

Types

type Settings

type Settings struct {
	Comments    string
	ReedSolomon bool
	Paranoid    bool
	OrderedKf   bool
	Deniability bool
}

func GetEncryptionSettings

func GetEncryptionSettings(r io.Reader) (Settings, error)

type Update

type Update struct {
	Status string
	Bps    int
	Total  int
}

Jump to

Keyboard shortcuts

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