license

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: AGPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(cryted string, key string) (string, error)

AesDecrypt AES解密

func AesEncrypt

func AesEncrypt(orig string, key string) (string, error)

AesEncrypt AES加密

func PKCS7Padding

func PKCS7Padding(ciphertext []byte, blocksize int) []byte

PKCS7Padding 补全码

func PKCS7UnPadding

func PKCS7UnPadding(origData []byte) []byte

PKCS7UnPadding 去补全码

func RsaDecrypt

func RsaDecrypt(ciphertext []byte, privateKey []byte) ([]byte, error)

RsaDecrypt RSA解密

func RsaEncrypt

func RsaEncrypt(origData []byte, publicKey []byte) ([]byte, error)

RsaEncrypt RSA加密

Types

type Data

type Data struct {
	MaxHostCount uint64 `json:"maxHostCount"`
}

type License

type License struct {
	ExpireDate time.Time `json:"expireDate"`
	IssueDate  time.Time `json:"issueDate"`
	User       string    `json:"user"`
	Data       Data      `json:"data"`
}

func ParseLicense

func ParseLicense(licenseKey string) (*License, error)

ParseLicense 解析license

func (*License) IsExpired

func (license *License) IsExpired() bool

Jump to

Keyboard shortcuts

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