encrypter

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encrypter

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

type GCMEncrypter

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

func NewGCMEncrypter

func NewGCMEncrypter(key string) (*GCMEncrypter, error)

func (*GCMEncrypter) Decrypt

func (e *GCMEncrypter) Decrypt(data []byte) ([]byte, error)

Decrypt decrypts an GCM encrypted byte array

func (*GCMEncrypter) Encrypt

func (e *GCMEncrypter) Encrypt(data []byte) ([]byte, error)

Encrypt encrypts the given byte array using cipher.NewGCM block cipher

type NoopEncrypter

type NoopEncrypter struct{}

func NewNoopEncrypter

func NewNoopEncrypter() *NoopEncrypter

func (*NoopEncrypter) Decrypt

func (e *NoopEncrypter) Decrypt(data []byte) ([]byte, error)

func (*NoopEncrypter) Encrypt

func (e *NoopEncrypter) Encrypt(data []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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