license

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2021 License: Apache-2.0 Imports: 11 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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