encryption

package
v0.1.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBodyCorrupted = errors.New("body corrupted")
View Source
var ErrCommentsTooLong = errors.New("comments exceed maximum length")
View Source
var ErrDuplicateKeyfiles = errors.New("duplicate keyfiles")
View Source
var ErrFileTooShort = errors.New("file too short")
View Source
var ErrHeaderCorrupted = errors.New("header corrupted")
View Source
var ErrIncorrectKeyfiles = errors.New("incorrect keyfiles")
View Source
var ErrIncorrectOrMisorderedKeyfiles = errors.New("incorrect or misordered 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,
) (bool, error)

func EncryptHeadless

func EncryptHeadless(
	in io.Reader,
	password string,
	keyfiles []io.Reader,
	settings Settings,
	out io.Writer,
) ([]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)

Jump to

Keyboard shortcuts

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