encryption

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 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 Encryption

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

func New

func New(key string) (*Encryption, error)

func (*Encryption) Decrypt

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

Decrypt decrypts stored data

func (*Encryption) Encrypt

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

Encrypt encrypts data using an AES-256 key

type IEncryption

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

type PlainText added in v0.0.11

type PlainText struct{}

func NewPlainText added in v0.0.11

func NewPlainText() *PlainText

func (*PlainText) Decrypt added in v0.0.11

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

func (*PlainText) Encrypt added in v0.0.11

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

Jump to

Keyboard shortcuts

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