crypto

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encryption

type Encryption struct {
}

func NewEncryption

func NewEncryption() *Encryption

func (*Encryption) DesDecrypt

func (_Encryption *Encryption) DesDecrypt(data string, key []byte) ([]byte, error)

DesDecrypt des解密

func (*Encryption) DesEncrypt

func (_Encryption *Encryption) DesEncrypt(origData, key []byte) (string, error)

DesEncrypt desc 加密

func (*Encryption) PKCS5Padding

func (_Encryption *Encryption) PKCS5Padding(cipherText []byte, blockSize int) []byte

PKCS5Padding 填充方式PKCS5Padding

func (*Encryption) PKCS5UnPadding

func (_Encryption *Encryption) PKCS5UnPadding(origData []byte) []byte

PKCS5UnPadding 对应 PKCS5Padding

Jump to

Keyboard shortcuts

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