crypt

package
v0.0.0-...-70044d4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthFunc

func AuthFunc() gin.HandlerFunc

func CryptPrivate

func CryptPrivate() gin.HandlerFunc

func Crypto

func Crypto() gin.HandlerFunc

func DecryptionByte

func DecryptionByte(encryptionData string) []byte

func DecryptionByteArray

func DecryptionByteArray(encryptionData []byte) []byte

func EncryptionByte

func EncryptionByte(resultStr []byte) (string, error)

func EncryptionByteNoError

func EncryptionByteNoError(resultStr []byte) string

func EncryptionInterface

func EncryptionInterface(resultJson map[string]interface{}) (string, error)

func EncryptionInterfaceLog

func EncryptionInterfaceLog(resultJson map[string]interface{}) string

func EncryptionSend

func EncryptionSend(code int, resultJson map[string]interface{}, context *gin.Context)

func EncryptionStreamSend

func EncryptionStreamSend(code int, result []byte, context *gin.Context)

func EncryptionString

func EncryptionString(jsonRes string) (string, error)

func GetDeCryptoString

func GetDeCryptoString(context *gin.Context) []byte

func GetDecryptedString

func GetDecryptedString(context *gin.Context) []byte

func GetRawString

func GetRawString(context *gin.Context) []byte

func QuietCrypto

func QuietCrypto() gin.HandlerFunc

func SetCryptFunc

func SetCryptFunc(
	crypt ...CryptFunc)

func TokenRole

func TokenRole() gin.HandlerFunc

Types

type CryptFunc

type CryptFunc func(input []byte) ([]byte, error)

type SignData

type SignData struct {
	Id           int      `json:"id" `
	Email        string   `json:"email" `
	CustomerId   int64    `json:"custom" `
	CustomerCode string   `json:"customerCode" `
	Granted      string   `json:"granted" `
	Level        int64    `json:"userLevel" `
	PhoneNumber  string   `json:"phoneNumber"`
	JiraAccount  string   `json:"jiraAccount"`
	JiraPassword string   `json:"jiraPassword"`
	RoleCode     []string `json:"role" `
	GroupCode    []string `json:"groupCode"`
}

func CheckToken

func CheckToken(context *gin.Context) (*SignData, error)

func CheckTokenPlain

func CheckTokenPlain(context *gin.Context) (*SignData, error)

func CheckTokenString

func CheckTokenString(tokenString string) (*SignData, error)

Jump to

Keyboard shortcuts

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