encryptor

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecoveryPanicAsError added in v1.0.4

func RecoveryPanicAsError() func(err error)

Types

type DefaultAES

type DefaultAES struct {
	config.Config
}

func NewDefaultAES

func NewDefaultAES(conf config.Config) *DefaultAES

func (*DefaultAES) Decrypt

func (c *DefaultAES) Decrypt(message string) (a string, err error)

func (*DefaultAES) DecryptWrapper

func (c *DefaultAES) DecryptWrapper(message string) (a string, err error)

func (*DefaultAES) Encrypt

func (c *DefaultAES) Encrypt(message string) (a string, err error)

func (*DefaultAES) EncryptWrapper

func (c *DefaultAES) EncryptWrapper(message string) (a string, err error)

func (*DefaultAES) GetConfig

func (c *DefaultAES) GetConfig() config.Config

type Encryptor

type Encryptor interface {
	GetConfig() config.Config
	Encrypt(message string) (string, error)
	Decrypt(message string) (string, error)

	EncryptWrapper(message string) (string, error)
	DecryptWrapper(message string) (string, error)
}

type PBEWithAES

type PBEWithAES struct {
	config.Config
	// contains filtered or unexported fields
}

func NewPBEWithAES

func NewPBEWithAES(conf config.Config) *PBEWithAES

func (*PBEWithAES) Decrypt

func (c *PBEWithAES) Decrypt(message string) (a string, err error)

func (*PBEWithAES) DecryptWrapper

func (c *PBEWithAES) DecryptWrapper(message string) (a string, err error)

func (*PBEWithAES) Encrypt

func (c *PBEWithAES) Encrypt(message string) (a string, err error)

func (*PBEWithAES) EncryptWrapper

func (c *PBEWithAES) EncryptWrapper(message string) (a string, err error)

func (*PBEWithAES) GetConfig

func (c *PBEWithAES) GetConfig() config.Config

type PBEWithDES

type PBEWithDES struct {
	config.Config
	// contains filtered or unexported fields
}

func NewPBEWithDES

func NewPBEWithDES(conf config.Config) *PBEWithDES

func (*PBEWithDES) Decrypt

func (c *PBEWithDES) Decrypt(message string) (a string, err error)

func (*PBEWithDES) DecryptWrapper

func (c *PBEWithDES) DecryptWrapper(message string) (a string, err error)

func (*PBEWithDES) Encrypt

func (c *PBEWithDES) Encrypt(message string) (a string, err error)

func (*PBEWithDES) EncryptWrapper

func (c *PBEWithDES) EncryptWrapper(message string) (a string, err error)

func (*PBEWithDES) GetConfig

func (c *PBEWithDES) GetConfig() config.Config

Jump to

Keyboard shortcuts

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