encryption

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAesEncryptor

func NewAesEncryptor(keygen KeyGenerator, password string) aesEncryptor

func NewArgon2Kdf

func NewArgon2Kdf(
	salt []byte,
	time uint32,
	memory uint32,
	threads uint8,
	keyLen uint32,
) argon2Kdf

Types

type Encryptor

type Encryptor interface {
	Encrypt([]byte) []byte
	Decrypt([]byte) ([]byte, error)
}

func GetEncryptor

func GetEncryptor(chosenEncryptor, masterPassword, salt string) Encryptor

type KeyGenerator

type KeyGenerator interface {
	Generate([]byte) []byte
}

type NoOpEncryptor

type NoOpEncryptor struct {
}

Do not use that. NoOpEncryptor was created specifically for tests.

func (*NoOpEncryptor) Decrypt

func (encryptor *NoOpEncryptor) Decrypt(data []byte) ([]byte, error)

func (*NoOpEncryptor) Encrypt

func (encryptor *NoOpEncryptor) Encrypt(data []byte) []byte

Jump to

Keyboard shortcuts

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