auth

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

* @Author: qida * @Date: 2022-01-07 13:49:59 * @LastEditTime: 2022-01-07 14:02:38 * @LastEditors: qida * @Description: * @FilePath: \zxjy_api_crme:\gopath\lib\src\github.com\qida\gfc\auth\xxxtea.go * good day

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	User  interface{}
	Xxtea *XxTea
	// contains filtered or unexported fields
}

func NewAuth

func NewAuth(key string) *Auth

func (*Auth) Decrypt

func (a *Auth) Decrypt(uid_auth string) (userAuth Auth, err error)

解密

func (*Auth) Encrypt

func (a *Auth) Encrypt(uid int, s interface{}) string

加密

type XxTea

type XxTea struct {
	Key string
}

func NewXxTea

func NewXxTea(key string) *XxTea

func (*XxTea) Decrypt

func (x *XxTea) Decrypt(debug bool, src []byte) (dst []byte)

解密

func (*XxTea) DecryptStr

func (x *XxTea) DecryptStr(src string) (dst string)

解密

func (*XxTea) Encrypt

func (x *XxTea) Encrypt(debug bool, src []byte) (dst []byte)

加密

func (*XxTea) EncryptStr

func (x *XxTea) EncryptStr(src []byte) (dst string)

加密

Jump to

Keyboard shortcuts

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