enc

package
v0.0.0-...-10b7c71 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Key = []byte("suckdaNaanddf394des239")
)

aes default key

Functions

func AesDecEncode

func AesDecEncode(encodeStr string, key []byte) ([]byte, error)

func AesDecrypt

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

func AesEncEncode

func AesEncEncode(origData, key []byte) (string, error)

func AesEncrypt

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

func GetKey

func GetKey() []byte

获取key

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func SetKey

func SetKey(s []byte)

key长度为16,多了截取[:16],少了补'0'

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