tool

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2022 License: Apache-2.0 Imports: 11 Imported by: 4

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

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