encryption

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 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)
}

Jump to

Keyboard shortcuts

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