tool

package
v0.0.0-...-18b5139 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PwdKey = []byte("DIS**#KKKDJJSKDI")

16,24,32位字符串的话,分别对应AES-128,AES-192,AES-256 加密方法 key不能泄露

Functions

func AesDeCrypt

func AesDeCrypt(cypted []byte, key []byte) ([]byte, error)

实现解密

func AesEcrypt

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

实现加密

func DePwdCode

func DePwdCode(pwd string) ([]byte, error)

解密

func EnPwdCode

func EnPwdCode(pwd []byte) (string, error)

加密base64

func GlobalCookie(ctx iris.Context, name string, value string)

设置全局cookie

func PKCS7Padding

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

PKCS7 填充模式

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) ([]byte, error)

填充的反向操作,删除填充字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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