encrypt

package
v0.0.0-...-d31a008 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

WIP

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptType

type EncryptType string
const (
	EncryptTypeZip EncryptType = "zip"
	EncryptTypeGPG EncryptType = "gpg"
)

type FileEncrypter

type FileEncrypter interface {
	Encrypt(w io.Writer, r io.Reader) error
}

func CreateEncrypter

func CreateEncrypter(t EncryptType) (FileEncrypter, error)

TODO: Functional options patternでオプションを渡せるようにする

type PGPEncrypter

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

func NewPGPEncrypter

func NewPGPEncrypter() (PGPEncrypter, error)

func (*PGPEncrypter) Encrypt

func (*PGPEncrypter) Encrypt(w io.Writer, r io.Reader) error

type ZipEncrypter

type ZipEncrypter struct {
	Password string
}

func (*ZipEncrypter) Encrypt

func (enc *ZipEncrypter) Encrypt(w io.Writer, r io.Reader) error

Jump to

Keyboard shortcuts

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