encrypt

package
v0.0.0-...-53d016b Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TRIPLE_DES_KEY []byte = []byte("@UNION_@#TRPLE_##ENCRY_#") // 24 bytes
)

Functions

func AesDecrypt

func AesDecrypt(ciphertext, key []byte) ([]byte, error)

func AesEncrypt

func AesEncrypt(plantText, key []byte) ([]byte, error)

func DesDecrypt

func DesDecrypt(crypted, key []byte) ([]byte, error)

func DesEncrypt

func DesEncrypt(origData, key []byte) ([]byte, error)

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blockSize int) []byte

func PKCS7UnPadding

func PKCS7UnPadding(plantText []byte, blockSize int) []byte

func TripleDesBase64DecryptStr

func TripleDesBase64DecryptStr(data string) (string, error)

func TripleDesBase64EncryptStr

func TripleDesBase64EncryptStr(data string) (string, error)

func TripleDesDecrypt

func TripleDesDecrypt(crypted, key []byte) ([]byte, error)

3DES解密

func TripleDesEncrypt

func TripleDesEncrypt(origData, key []byte) ([]byte, error)

3DES加密

func ZeroPadding

func ZeroPadding(ciphertext []byte, blockSize int) []byte

func ZeroUnPadding

func ZeroUnPadding(origData []byte) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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