crypto

package
v0.0.0-...-979ab6c Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEncrypt is returned when encryption fails.
	ErrEncrypt = errors.New("crypto: encryption failed")

	// ErrDecrypt is returned when decryption fails.
	ErrDecrypt = errors.New("crypto: decryption failed")
)
View Source
var (
	// IterationsHigh is the recommended number of iterations for
	// file encryption according to the scrypt docs.
	IterationsHigh = 1048576

	// IterationsLow is twice the number of iterations for interactive
	// encryption as specified in the scrypt docs.
	IterationsLow = 32768

	// Iterations contains the number of iterations to be used by
	// filecrypt; the default is the standard filecrypt number.
	Iterations = IterationsHigh
)

Functions

func Open

func Open(pass, message []byte) ([]byte, error)

Open recovers a message encrypted using a passphrase.

func Seal

func Seal(pass, message []byte) ([]byte, error)

Seal encrypts a message using a passphrase.

func Zero

func Zero(in []byte)

Zero attempts to zeroise its input.

Types

This section is empty.

Jump to

Keyboard shortcuts

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