encrypt

package
v0.0.0-...-097ec1e Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesCBCDncrypt

func AesCBCDncrypt(encryptData, key []byte) ([]byte, error)

func AesCBCEncrypt

func AesCBCEncrypt(rawData, key []byte) ([]byte, error)

aes加密,填充模式由key决定,16位,24,32分别对应AES-128, AES-192, or AES-256.源码好像是写死16了

func Decrypt

func Decrypt(rawData string, key []byte) (string, error)

func EcbDecrypt

func EcbDecrypt(data, key []byte) []byte

func EcbEncrypt

func EcbEncrypt(data, key []byte) []byte

func Encrypt

func Encrypt(rawData, key []byte) (string, error)

func PKCS7Padding

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

使用PKCS7进行填充,IOS也是7

func PKCS7UnPadding

func PKCS7UnPadding(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