license

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

README

activation-code

Golang 激活码方案

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeyPair

func GenerateKeyPair() (publicKey []byte, privateKey []byte, err error)

Types

type Licence

type Licence struct {
	Product   string `json:"product"`
	User      string `json:"user"`
	UUID      string `json:"UUID,omitempty"`
	SN        string `json:"SN,omitempty"`
	CPUID     string `json:"CPUID,omitempty"`
	MAC       string `json:"MAC,omitempty"`
	ExpireAt  string `json:"expireAt"`
	Signature string `json:"signature"`
}

func (*Licence) Decode

func (l *Licence) Decode(text string) error

func (*Licence) Encode

func (l *Licence) Encode() string

func (*Licence) Match

func (l *Licence) Match(product string) error

func (*Licence) Sign

func (l *Licence) Sign(privateKey []byte)

func (*Licence) Verify

func (l *Licence) Verify(publicKey []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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