Documentation
¶
Index ¶
- Constants
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func CreateLicense(data LicenseStruct) (rsp string, err error)
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- type Function
- type LicenseStruct
Constants ¶
View Source
const KEY = "#HvL%$o0oNNoOZnk#o2qbqCeQB1iXeIR"
Variables ¶
This section is empty.
Functions ¶
func CreateLicense ¶
func CreateLicense(data LicenseStruct) (rsp string, err error)
CreateLicense 生成license
func PKCS7Padding ¶
func PKCS7UnPadding ¶
Types ¶
type LicenseStruct ¶
type LicenseStruct struct {
CodeType int64 `fmt:"codeType"`
Customer string `fmt:"customer"`
DeviceSN string `fmt:"deviceSN"`
Expires int64 `fmt:"expires"`
Functions Function `fmt:"functions"`
ReleaseDate string `fmt:"releaseDate"`
Supplier string `fmt:"supplier"`
}
func GetByLicense ¶
func GetByLicense(license string) (rsp *LicenseStruct, err error)
GetByLicense 根据license解码生成map[string]interface{}
Click to show internal directories.
Click to hide internal directories.