crypto

package
v0.0.0-...-906ccd7 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultParams = &CryptoParams{
		memory:     64 * 1024,
		iterations: 1,
		threads:    4,
		saltLength: 16,
		keyLength:  32,
	}
	ErrInvalidData         = errors.New("data provided is not a valid encoded data")
	ErrIncompatibleVersion = errors.New("encryption version is incompatible")
)

Functions

func Decrypt

func Decrypt(encodedData string, masterPassword []byte) ([]byte, error)

func Encrypt

func Encrypt(srcBytes []byte, masterPassword []byte, params *CryptoParams) (string, error)

Types

type CryptoParams

type CryptoParams struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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