crypto

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypt

type Crypt interface {
	Crypter
	EncryptFile(inputPath, outputPath string) error
	EncryptFiles(inputDir, outputDir, inputExtension, outputExtension string) error
	DecryptFile(inputPath, outputPath string) error
	DecryptFiles(inputDir, outputDir, inputExtension, outputExtension string) error
}

Crypt is an abstraction for encryption and decryption with files support

func New added in v0.0.4

func New(crypter Crypter) Crypt

New creates a new Crypt with the given provider

type Crypter added in v0.1.0

type Crypter interface {
	Encrypter
	Decrypter
}

Crypter is an Encrypter and a Decrypter

type Decrypter added in v0.1.0

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

Decrypter must be able to decrypt ciphertext into plaintext, see also Encrypter

type Encrypter added in v0.1.0

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

Encrypter must be able to encrypt plaintext into ciphertext, see also Decrypter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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