tool

package
v1.5.43 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesECBDecrypt

func AesECBDecrypt(key string, ciphertextStr string) (plaintext []byte, err error)

func AesECBEncrypt

func AesECBEncrypt(key string, plaintext []byte) (ciphertextStr string, err error)

func NewECBDecrypter

func NewECBDecrypter(b cipher.Block) cipher.BlockMode

func NewECBEncrypter

func NewECBEncrypter(b cipher.Block) cipher.BlockMode

func PKCS5Padding

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

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func PageLimit added in v1.2.5

func PageLimit(page, limit int) (int, int)

Types

type JwtToken

type JwtToken struct {
	Token         string
	TokenTimeline int64
}

func CreateAuthToken

func CreateAuthToken(in JwtTokenData, t time.Duration) (JwtToken, error)

type JwtTokenData

type JwtTokenData struct {
	OpenId string
	AppId  string
	Scope  string
}

func CheckAuthToken

func CheckAuthToken(authToken string) (out JwtTokenData, err error)

Jump to

Keyboard shortcuts

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