util

package
v1.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 10 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.

func Dncrypt

func Dncrypt(rawData string) (string, error)

func Encrypt

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

func PKCS7Padding

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

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

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

func ReturnMessage

func ReturnMessage(c *gin.Context, resp RespJson)

Types

type RespJson

type RespJson struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

Jump to

Keyboard shortcuts

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