encryption

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AES

type AES struct{}

func (*AES) Decrypt

func (A *AES) Decrypt(data string, key string) (string, error)

func (*AES) Encrypt

func (A *AES) Encrypt(data string, key string) (string, error)

func (*AES) Name

func (A *AES) Name() string

type Encryption

type Encryption interface {
	Name() string
	Encrypt(data string, key string) (string, error)
	Decrypt(data string, key string) (string, error)
}

type RSA added in v0.0.3

type RSA struct {
	PublicKey  *rsa.PublicKey
	PrivateKey *rsa.PrivateKey
}

func NewRSA added in v0.0.3

func NewRSA() (RSA, error)

func (RSA) Decrypt added in v0.0.3

func (R RSA) Decrypt(data string, key string) (string, error)

func (RSA) Encrypt added in v0.0.3

func (R RSA) Encrypt(data string, key string) (string, error)

func (RSA) Name added in v0.0.3

func (R RSA) Name() string

Jump to

Keyboard shortcuts

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