encrypt

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: May 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package encrypt holds required functionality for encryption and decryption

Package encrypt holds required functionality for encryption and decryption

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AESEncryptor

type AESEncryptor struct {
}

AESEncryptor struct represent the data needed for AES encryption and decryption.

func (*AESEncryptor) Decrypt

func (a *AESEncryptor) Decrypt(data []byte, passphrase string) ([]byte, error)

Decrypt method decrypts the given data

func (*AESEncryptor) Encrypt

func (a *AESEncryptor) Encrypt(data []byte, passphrase string) ([]byte, error)

Encrypt method encrypts the given data

type Encryptor

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

Encryptor interface exposes functions for encrypt/decrypt

type Factory

type Factory struct {
	ID string
}

Factory struct holds Encrypts

func (*Factory) Encryptor added in v0.8.0

func (f *Factory) Encryptor() Encryptor

Encryptor method returns an encryptor

Jump to

Keyboard shortcuts

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