license

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFingerprint

func GenerateFingerprint() (string, error)

func GenerateLicense

func GenerateLicense(fingerprint string, license License) (string, error)

func GenerateRsaKey

func GenerateRsaKey(publicPemPath, privatePemPath string) error

func RsaDecrypt

func RsaDecrypt(encrypt []byte) ([]byte, error)

func RsaEncrypt

func RsaEncrypt(content []byte) ([]byte, error)

func SetPrivatePem

func SetPrivatePem(privateFile string) error

func SetPublicPem

func SetPublicPem(publicFile string) error

Types

type Authorization

type Authorization struct {
	Type      string   `json:"type"`
	Name      string   `json:"name"`
	ValueType string   `json:"valueType"`
	Values    []string `json:"values"`
	Current   string   `json:"current,omitempty"`
}

type License

type License struct {
	IsForever       bool            `json:"isForever"`
	ValidDatetime   string          `json:"validDatetime"`
	CurrentDatetime string          `json:"currentDatetime"`
	ValidDuration   int             `json:"validDuration"`
	CurrentDuration int             `json:"currentDuration"`
	Authorizations  []Authorization `json:"authorizations,omitempty"`
}

func LoadLicense

func LoadLicense(content string) (*License, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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