aes

package
v0.0.0-...-08fe5ed Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: MIT Imports: 5 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 {
	Mode    string // 加密模式  ECB / CBC / CFB / OFB / CTR  default: ECB
	Padding string // 填充模式 NoPadding / ZeroPadding / PKCS7Padding / PKCS5Padding
}

func GetInstance

func GetInstance(str string) *AES

GetInstance 实例化一个 des 对象 如: GetInstance("ECB/PKCS7Padding")

func (*AES) Decrypt

func (d *AES) Decrypt(data []byte, key []byte, iv []byte) ([]byte, error)

Decrypt 解密处理

func (*AES) Encrypt

func (d *AES) Encrypt(data []byte, key []byte, iv []byte) ([]byte, error)

Encrypt 加密处理

Jump to

Keyboard shortcuts

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