encrypt

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 默认长度
	DefaultAesBlockSize = 16
)

Functions

This section is empty.

Types

type AesTool

type AesTool struct {
	//128 192  256位的其中一个 长度 对应分别是 16 24  32字节长度
	Key       []byte
	BlockSize int
}

AES ECB模式的加密解密

func NewAesTool

func NewAesTool(key []byte, blockSize int) *AesTool

func (*AesTool) DecryptBase64

func (a *AesTool) DecryptBase64(src string) (string, error)

DecryptBase64 从base64编码中返回

func (*AesTool) EncryptBase64

func (a *AesTool) EncryptBase64(src string) (string, error)

EncryptBase64 加密并返回base64编码

Jump to

Keyboard shortcuts

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