encrypt

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 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 Encrypter

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

Encrypter encrypter

func New

func New(m Method, key string) *Encrypter

New create new encrypter

func (*Encrypter) Decrypt

func (enc *Encrypter) Decrypt(src []byte) ([]byte, error)

Decrypt decrypt data

func (*Encrypter) Encrypt

func (enc *Encrypter) Encrypt(src []byte) ([]byte, error)

Encrypt encrypt data

type Method

type Method byte

Method encrypt method

const (
	// Aes aes method
	Aes Method = 1 << 0
	// Des des method
	Des Method = 1 << 1
)

Jump to

Keyboard shortcuts

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