vault

package
v0.0.1-alpha-1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(pwdKey, data []byte) ([]byte, error)

func DeriveKey

func DeriveKey(password, salt []byte) ([]byte, []byte, error)

func Encrypt

func Encrypt(pwdKey, data []byte) ([]byte, error)

Types

type Decrypter

type Decrypter interface {
	Decrypt(ciphertext []byte) ([]byte, error)
}

type EncryptDecrypter

type EncryptDecrypter interface {
	Encrypter
	Decrypter
}

type Encrypter

type Encrypter interface {
	Encrypt(plaintext []byte) ([]byte, error)
}

type Repository

type Repository interface {
	Save(key []byte, value io.Reader) error
	Retrieve(key []byte) (io.Reader, error)
}

func NewFSRepository

func NewFSRepository(loc string) Repository

type Service

type Service interface {
	Save(key []byte, value io.Reader) error
	Retrieve(key []byte) (io.Reader, error)
}

func NewService

func NewService(repo Repository, masterPwd string) Service

Jump to

Keyboard shortcuts

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