encrypt

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MagicKey = "f1c8eafb543f03023e97b7be864a4e9b"
)

Variables

This section is empty.

Functions

func MagicKeyDecode

func MagicKeyDecode(data []byte) []byte

解密特殊信息

func MagicKeyEncode

func MagicKeyEncode(data []byte) []byte

加密特殊信息

func RecoverMethodPanic

func RecoverMethodPanic(err interface{}) error

Types

type AES128CFBMethod

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

func (*AES128CFBMethod) Decrypt

func (this *AES128CFBMethod) Decrypt(dst []byte) (src []byte, err error)

func (*AES128CFBMethod) Encrypt

func (this *AES128CFBMethod) Encrypt(src []byte) (dst []byte, err error)

func (*AES128CFBMethod) Init

func (this *AES128CFBMethod) Init(key, iv []byte) error

type AES192CFBMethod

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

func (*AES192CFBMethod) Decrypt

func (this *AES192CFBMethod) Decrypt(dst []byte) (src []byte, err error)

func (*AES192CFBMethod) Encrypt

func (this *AES192CFBMethod) Encrypt(src []byte) (dst []byte, err error)

func (*AES192CFBMethod) Init

func (this *AES192CFBMethod) Init(key, iv []byte) error

type AES256CFBMethod

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

func (*AES256CFBMethod) Decrypt

func (this *AES256CFBMethod) Decrypt(dst []byte) (src []byte, err error)

func (*AES256CFBMethod) Encrypt

func (this *AES256CFBMethod) Encrypt(src []byte) (dst []byte, err error)

func (*AES256CFBMethod) Init

func (this *AES256CFBMethod) Init(key, iv []byte) error

type MethodInterface

type MethodInterface interface {
	// Init 初始化
	Init(key []byte, iv []byte) error

	// Encrypt 加密
	Encrypt(src []byte) (dst []byte, err error)

	// Decrypt 解密
	Decrypt(dst []byte) (src []byte, err error)
}

func NewMethodInstance

func NewMethodInstance(method string, key string, iv string) (MethodInterface, error)

type RawMethod

type RawMethod struct {
}

func (*RawMethod) Decrypt

func (this *RawMethod) Decrypt(dst []byte) (src []byte, err error)

func (*RawMethod) Encrypt

func (this *RawMethod) Encrypt(src []byte) (dst []byte, err error)

func (*RawMethod) Init

func (this *RawMethod) Init(key, iv []byte) error

Jump to

Keyboard shortcuts

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