desede

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 TripleDES

type TripleDES struct {
	Mode    string // 加密模式  ECB / CBC / CFB / OFB / CTR  default: ECB
	Padding string // 填充模式 NoPadding / ZeroPadding / PKCS7 / PKCS5
}

func GetInstance

func GetInstance(str string) *TripleDES

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

func (*TripleDES) Decrypt

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

Decrypt 解密处理

func (*TripleDES) Encrypt

func (d *TripleDES) 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